NAV Navigation
http curl

Partner API V3 Reference

Introduction

The Partner API V3 Documentation provides details of the APIs used to manage user profile, user workout presets, user workout results, equipment and facility data.

API Endpoints (Base URLs)

Authentication

To access the Partner API V3 resources, the client needs to get an access token by providing the client credentials to the Authentication endpoint. The success response includes an access token which should be used as the Bearer token in the Authorization header for accessing Partner API v3 APIs.

Client Credentials

Client credentials are used to obtain an access token during Authentication they consist of a clientId and a clientSecret. Client credentials are unique to the client and the environment and distributed only to authorized parties. Please refer to Halo Fitness Developer Portal for more details on getting started.

Authentication Token

Authenticates the client's credentials and returns an oauth-access-token that can be used to make requests to the resources described in this documentation.

Endpoint

POST /api/v3/oauth/token

POST /api/v3/oauth/token HTTP/1.1
Host: {{BASE_URL}}
Content-Type: application/json
Accept: application/json
Content-Length: 108

{
    "grantType": "client_credentials",
    "clientId": "0c4b64...",
    "clientSecret": "TUv17HH..."
}
curl --location '{{BASE_URL}}/api/v3/oauth/token' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
    "grantType": "client_credentials",
    "clientId": "0c4b64...",
    "clientSecret": "TUv17HH..."
}'

Headers

Header Value
Accept application/json
Content-Type application/json

Body

Parameter Type Required
clientId string Y
clientSecret string Y
grantType string ("client_credentials") Y

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates that client authorization succeeded and the access token required to make requests to endpoints in this documentation has been returned in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "accessToken": "eyAbc...",
        "tokenType": "Bearer",
        "expiresInSeconds": 3600
    },
    "error": null,
    "meta": null
}
Parameter Type Description
status string Indicates status of response
data.accessToken string oauth access token used as the Bearer token to access Partner APIs
data.tokenType string oauth access token type - "Bearer"
data.expiresInSeconds number oauth access token expiry time in seconds (1 hour)
error object null in case of success response
meta object meta object will be populated if any relevant metadata is available

Error

Errors returned from this endpoint can be one of the following

400
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1001,
        "errorMsg": "Missing parameter/s:  Please provide a valid clientId and clientSecret"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1006,
        "errorMsg": "Invalid grantType. Supported grant type is client_credentials"
    },
    "meta": null
}

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1002,
        "errorMsg": "Invalid clientId and/or clientSecret."
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

OAuth

Verify OAuth Code

Third party developer application can request an access token for an existing user account from the PartnerAPI oauthAuthorize web page. This API takes the Authorization Code retrieved from the oauthAuthorize web page and returns user access token and refresh tokens in successful response. The Authorization code is usable only once.

Endpoint

POST /api/v3/oauth/verify-code

POST /api/v3/oauth/verify-code HTTP/1.1
Host: {{BASE_URL}}
Authorization: Bearer eyAbc...
Accept: application/json
Content-Type: application/json
Content-Length: 59

{
    "code": "b1d67c0d65e61449b94ba33280e43e37|574934"
}
curl --location '{{BASE_URL}}/api/v3/oauth/verify-code' \
--header 'Authorization: Bearer eyAbc...' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
    "code": "b1d67c0d65e61449b94ba33280e43e37|574934"
}'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}

Body

Parameter Type Required
code string Y

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the code was valid and user's access and refresh tokens are returned in the success response.

{
    "status": "SUCCESSFUL",
    "data": {
        "expiresIn": 31536000,
        "accessToken": "9574cd575d7473405b846560c4d79d86|92733cdd75e7ba5e276479748e996180",
        "tokenType": "Bearer",
        "refreshToken": "92733cdd75e7ba5e276479748e996180|703919a789c6b8e50d87da89572008f0|328905"
    },
    "error": null,
    "meta": null
}
Parameter Type
status string
data Object
data.expiresIn numeric
data.accessToken string
data.tokenType string
data.refreshToken string
meta Object / NULL
error Object / NULL

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1004,
        "errorMsg": "Incorrect or expired Authorization Code"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 500,
        "errorMsg": "Internal Error"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Refresh OAuth Tokens

This API can be used to regenerate the access and refresh tokens from a valid refresh token of a user.

Endpoint

POST /api/v3/oauth/refresh-tokens

POST /api/v3/oauth/refresh-tokens HTTP/1.1
Host: {{BASE_URL}}
Authorization: Bearer eyAbc...
Accept: application/json
Content-Type: application/json
Content-Length: 59

{
    "refreshToken": "92733cdd75e7ba5e276479748e996180|9e382d69eae2c1acbb62c6d6c58885ad|921977"
}
curl --location '{{BASE_URL}}/api/v3/oauth/refresh-tokens' \
--header 'Authorization: Bearer eyAbc...' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
    "refreshToken": "92733cdd75e7ba5e276479748e996180|9e382d69eae2c1acbb62c6d6c58885ad|921977"
}'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}

Body

Parameter Type Required
refreshToken string Y

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the code was valid and user's access and refresh tokens are returned in the success response.

{
    "status": "SUCCESSFUL",
    "data": {
        "expiresIn": 31536000,
        "accessToken": "9574cd575d7473405b846560c4d79d86|92733cdd75e7ba5e276479748e996180",
        "tokenType": "Bearer",
        "refreshToken": "92733cdd75e7ba5e276479748e996180|703919a789c6b8e50d87da89572008f0|328905"
    },
    "error": null,
    "meta": null
}
Parameter Type
status string
data Object
data.expiresIn numeric
data.accessToken string
data.tokenType string
data.refreshToken string
meta Object / NULL
error Object / NULL

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1005,
        "errorMsg": "Invalid token.  Please provide a valid refreshToken"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1005,
        "errorMsg": "Invalid token. refreshToken not found"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 500,
        "errorMsg": "Internal Error"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

User Profile

This section contains APIs which manage a user's profile.

Create User

Creates a new user account.

Endpoint

POST /api/v3/users

POST /api/v3/users HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
Content-Type: application/json

{
    "emailAddress": "jane.doe@nowhere.com",
    "xid": "JN10001",
    "dob": "1990-01-30",
    "weight": 150.80,
    "weightUnit": "M",
    "password": "Test123!",
    "height": 170.50,
    "heightUnit": "M",
    "firstName": "Jane",
    "lastName": "Doe",
    "gender": "f",
    "preferredLanguageCode": "en",
    "preferredUnit": "M",
    "facilityIdList": [20],
    "RFIDList": ["AA11BB22"],
  }
curl --location '{{BASE_URL}}/api/v3/users' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'Content-Type: application/json' \
--data-raw '{
    "emailAddress": "jane.doe@nowhere.com",
    "xid": "JN10001",
    "dob": "1990-01-30",
    "weight": 150.80,
    "weightUnit": "M",
    "password": "Test123!",
    "height": 170.50,
    "heightUnit": "M",
    "firstName": "Jane",
    "lastName": "Doe",
    "gender": "f",
    "preferredLanguageCode": "en",
    "preferredUnit": "M",
    "facilityIdList": [20],
    "RFIDList": ["AA11BB22"]
  }'

Headers

Header Value
Accept application/json
Content-Type application/json
Authorization Bearer {oauth-access-token}

Body

Parameter Type Required
emailAddress string (Email of the user. Maximum characters allowed is 200) Y
xid string (External account id of the user. Maximum characters allowed is 50) Y
dob string (Date of birth of the user in the 'yyyy-MM-dd' format. Supported age range is from 13 to 100 years) Y
weight numeric (If weightUnit is provided as 'M' then minimum value is 34 and maximum value is 181. If weightUnit is provided as 'I' then minimum value is 75 and maximum value is 400) Y
weightUnit string (Unit code of the value used in 'weight' property, else defaults to the 'preferredUnit' property. Supported values are either "I" or "M") N
height numeric (If heightUnit is provided as 'M' then minimum value is 60 and maximum value is 310. If heightUnit is provided as 'I' then minimum value is 23.64 and maximum value is 122.04) N
heightUnit string (Unit code of the value used in 'height' property, else defaults to the 'preferredUnit' property. . Supported values are either "I" or "M") N
password string (Password of the user. If not specified, a random autogenerated password is set for the user. The password policy is: minimum 8 characters, at least one number is required, at least one upper case or lower case letter is required, at least one special character (!@#$%^&*) is required) N
firstName string (First name of the user. Maximum characters allowed is 200) N
lastName string (Last name of the user. Maximum characters allowed is 200) N
gender string (Gender of the user. Supported values are "m" or "f" ) N
preferredLanguageCode string (Language code of the user's preferred language. If not specified, the default value is "en". Supported values: [ en_US = US English, en = British English, fr = Français, de = Deutsch, nl = Nederlands, it = Italiano, es = Español, ja = 日本語, zh = 简体中文, pt = Português, ru = Pусский, tr = Türkçe, ca = Català, eu = Euskara, fi = Suomi, hu = Magyar, ko = 한국어, pl = Polski, zhl = 繁體中文, cy = Cymraeg, ar = العربية, he = עִברִית ] N
preferredUnit string (User's preferred Unit code. If not specified, Default value "I" will be set. Supported values are either "I" or "M") N
facilityIdList integer array (List of facilities associated with the user) N
RFIDList string array (List of RFID tags associated with the user) N

Response

Success

A successful response returns a HTTP Status Code: 201 - Created. This indicates the user was created successfully.

{
  "data":{
    "userAccessToken": "xyz123...",
    "userAccessTokenExpiry": 1677689984915,
    "emailAddress": "jane.doe@nowhere.com",
    "xid": "JN10001",
    "dob": "1990-01-30",
    "weight": 150.80,
    "weightUnit": "M",
    "height": 170.50,
    "heightUnit": "M",
    "firstName": "Jane",
    "lastName": "Doe",
    "gender": "f",
    "preferredLanguageCode": "en",
    "preferredUnit": "M",
    "facilityIdList": [20],
    "RFIDList": ["AA11BB22"],
    "age": 23,
    "enabled": true,
    "createdAt": "2023-02-16T18:48:37Z",
    "updatedAt": "2023-02-16T18:48:37Z",
  },
  "meta": {
  }
}
Parameter Type
data Object
data.userAccessToken string
data.userAccessTokenExpiry integer (Epoch time in millis indicating the expiry of the "userAccessToken" property)
data.emailAddress string
data.xid string
data.dob string (yyyy-MM-dd)
data.weight numeric
data.weightUnit string ("I"/"M") / NULL
data.height numeric / NULL
data.heightUnit string ("I"/"M") / NULL
data.firstName string / NULL
data.lastName string / NULL
data.gender string ("m"/"f") / NULL
data.preferredLanguageCode string
data.preferredUnit string ("I"/"M")
data.facilityIdList integer[] / NULL
data.RFIDList string[] / NULL
data.age integer
data.enabled boolean
data.createdAt string (ISO 8601)
data.updatedAt string (ISO 8601)
meta Object / NULL

Error

Errors returned from this endpoint can be one of the following

401
{
  "errorCode": "Authorization",
  "errorMessage": "Not authorized for resource.",
  "innerErrors": [
    {
      "errorCode": "ClientAccessTokenInvalid",
      "errorTarget": {
        "source": "Header",
        "key": "Authorization",
      }
    }
  ]
}

409
{
  "errorCode": "Conflict",
  "errorMessage": "Unable to fulfill request due to conflict.",
  "innerErrors": [
    {
      "errorCode": "EmailAddressInUse",
      "errorTarget": {
        "source": "Body",
        "key": "emailAddress",
      },
      "message": "This emailAddress is already in use."
    },
    {
      "errorCode": "XIDInUse",
      "errorTarget": {
        "source": "Body",
        "key": "xid",
      },
      "message": "This xid is already in use."
    }
  ]
}

422
{
  "errorCode": "Validation",
  "errorMessage": "The given data failed to pass validation.",
  "innerErrors": [
    {
      "errorCode": "RequiredValidation",
      "errorTarget": {
        "source": "Body",
        "key": "emailAddress",
      },
      "message":"The 'emailAddress' property is required."
    },
    {
      "errorCode": "RequiredValidation",
      "errorTarget": {
        "source": "Body",
        "key": "xid",
      },
      "message":"The 'xid' property is required."
    },
    {
      "errorCode": "RequiredValidation",
      "errorTarget": {
        "source": "Body",
        "key": "weight",
      },
      "message":"The 'weight' property is required."
    },
    {
      "errorCode": "RequiredValidation",
      "errorTarget": {
        "source": "Body",
        "key": "dob",
      },
      "message":"The 'dob' property is required."
    },
    {
      "errorCode": "StringValidation",
      "errorTarget": {
        "source": "Body",
        "key": "emailAddress",
      },
      "message":"The 'emailAddress' property must be a string."
    },
    {
      "errorCode": "EmailValidation",
      "errorTarget": {
        "source": "Body",
        "key": "emailAddress",
      },
      "message":"The 'emailAddress' property must be an email."
    },
    {
      "errorCode": "StringValidation",
      "errorTarget": {
        "source": "Body",
        "key": "xid",
      },
      "message":"The 'xid' property must be a string."
    },
    {
      "errorCode": "StringValidation",
      "errorTarget": {
        "source": "Body",
        "key": "dob",
      },
      "message":"The 'dob' property must be a string."
    },
    {
      "errorCode": "EmailValidation",
      "errorTarget": {
        "source": "Body",
        "key": "email",
      },
      "message":"The 'email' property must be an email."
    },
    {
      "errorCode": "DateValidation",
      "errorTarget": {
        "source": "Body",
        "key": "dob",
      },
      "message":"The 'dob' property must be a date in format 'yyyy-MM-dd'."
    },
    {
      "errorCode": "AgeValidation",
      "errorTarget": {
        "source": "Body",
        "key": "dob",
      },
      "message":"The 'dob' property should have the year corresponding to age between 13 and 100 years."
    },
    {
      "errorCode": "ISO639Validation",
      "errorTarget": {
        "source": "Body",
        "key": "preferredLanguageCode"
      },
      "message": "The 'preferredLanguageCode' property is not valid."
    },
    {
      "errorCode": "UnitValidation",
      "errorTarget": {
        "source": "Body",
        "key": "heightUnit"
      },
      "message": "The 'heightUnit' property must be one of the following strings 'M' or 'I'."
    },
    {
      "errorCode": "UnitValidation",
      "errorTarget": {
        "source": "Body",
        "key": "weightUnit"
      },
      "message": "The 'weightUnit' property must be one of the following strings 'M' or 'I'."
    },
    {
      "errorCode": "UnitValidation",
      "errorTarget": {
        "source": "Body",
        "key": "preferredUnit"
      },
      "message": "The 'preferredUnit' property must be one of the following strings 'M' or 'I'."
    },
    {
      "errorCode": "InvalidStringValidation",
      "errorTarget": {
        "source": "Body",
        "key": "gender"
      },
      "message": "The 'gender' property must be one of the following values: [\"m\",\"f\"]"
    },
    {
      "errorCode": "PasswordPolicyNotMet",
      "errorTarget": {
        "source": "Body",
        "key": "password"
      },
      "message": "The 'password' property must be the password policy."
    },
    {
      "errorCode": "NumericValidation",
      "errorTarget": {
          "source": "Body",
          "key": "height"
      },
      "message": "The 'height' property must be a numeric value with or without decimals."
    },
    {
      "errorCode": "NumericValidation",
      "errorTarget": {
          "source": "Body",
          "key": "weight"
      },
      "message": "The 'weight' property must be a numeric value with or without decimals."
    },
    {
      "errorCode": "HeightValidation",
      "errorTarget": {
          "source": "Body",
          "key": "height"
      },
      "message": "The 'height' property must be within supported range."
    },
    {
      "errorCode": "WeightValidation",
      "errorTarget": {
          "source": "Body",
          "key": "weight"
      },
      "message": "The 'weight' property must be within supported range."
    },
    {
      "errorCode": "FacilityIdsValidation",
      "errorTarget": {
        "source": "Body",
        "key": "facilityIds"
      },
      "message": "The 'facilityIds' property must be an array of unique integers."
    },
    {
      "errorCode": "FacilityIdsValidation",
      "errorTarget": {
        "source": "Body",
        "key": "facilityIds"
      },
      "message": "Invalid facilityIds: {invalidFacilityIds}"
    },
    {
      "errorCode": "MaximumCharactersLimitValidation",
      "errorTarget": {
        "source": "Body",
        "key": "{property}"
      },
      "message": "The {property} exceeded the maximum allowed character limit"
    }
  ]
}

500
{
  "errorCode": "Fault",
  "errorMessage": "A server error occurred.",
  "innerErrors": []
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Get User information

Retrieves an existing user using the user-access-token in the user-access-token header.

Endpoint

GET /api/v3/users

GET /api/v3/users HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/users' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the user was successfully retrieved and their data is available in the body.

{
  "data":{
    "userAccessToken": "xyz123...",
    "userAccessTokenExpiry": 1677689984915,
    "emailAddress": "jane.doe@nowhere.com",
    "xid": "JN10001",
    "dob": "1990-01-30",
    "weight": 150.80,
    "weightUnit": "M",
    "height": 170.50,
    "heightUnit": "M",
    "firstName": "Jane",
    "lastName": "Doe",
    "gender": "f",
    "preferredLanguageCode": "en",
    "preferredUnit": "M",
    "facilityIdList": [20],
    "RFIDList": ["AA11BB22"],
    "age": 23,
    "enabled": true,
    "createdAt": "2023-02-16T18:48:37Z",
    "updatedAt": "2023-02-16T18:48:37Z",
  },
  "meta": {
  }
}
Parameter Type
data Object
data.userAccessToken string
data.userAccessTokenExpiry integer (Epoch time in millis indicating the expiry of the "userAccessToken" property)
data.emailAddress string
data.xid string
data.dob string (yyyy-MM-dd)
data.weight numeric
data.weightUnit string ("I"/"M") / NULL
data.height numeric / NULL
data.heightUnit string ("I"/"M") / NULL
data.firstName string / NULL
data.lastName string / NULL
data.gender string ("m"/"f") / NULL
data.preferredLanguageCode string
data.preferredUnit string ("I"/"M")
data.facilityIdList integer[] / NULL
data.RFIDList string[] / NULL
data.age integer
data.enabled boolean
data.createdAt string (ISO 8601)
data.updatedAt string (ISO 8601)
meta Object / NULL

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404
{
  "errorCode": "NotFound",
  "errorMessage": "The requested resource was not found.",
  "innerErrors": [
    {
      "errorCode": "UserNotFound",
      "errorTarget": {
        "source": "Header",
        "key": "user-access-token",
      }
    }
  ]
}

500
{
  "errorCode": "Fault",
  "errorMessage": "A server error occurred.",
  "innerErrors": []
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Update User

Updates an existing user using the user-access-token in the user-access-token header. This API can be used to change the user's email, password, xid and also to enable/disable the user.

Endpoint

PUT /api/v3/users

PUT /api/v3/users HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
Content-Type: application/json
Content-Length: 353

{
    "emailAddress": "jane.doe@nowhere.com",
    "xid": "JN10001",
    "dob": "1990-01-30",
    "weight": 150.80,
    "weightUnit": "M",
    "password": "Test123!",
    "height": 170.50,
    "heightUnit": "M",
    "firstName": "Jane",
    "lastName": "Doe",
    "gender": "f",
    "preferredLanguageCode": "en",
    "preferredUnit": "M",
    "enabled": true,
}
curl --location --request PUT '{{BASE_URL}}/api/v3/users' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...' \
--header 'Content-Type: application/json' \
--data-raw '{
    "emailAddress": "jane.doe@nowhere.com",
    "xid": "JN10001",
    "dob": "1990-01-30",
    "weight": 150.80,
    "weightUnit": "M",
    "password": "Test123!",
    "height": 170.50,
    "heightUnit": "M",
    "firstName": "Jane",
    "lastName": "Doe",
    "gender": "f",
    "preferredLanguageCode": "en",
    "preferredUnit": "M",
    "enabled": true
}'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Body

Parameter Type Required
emailAddress string (Email of the user. Maximum characters allowed is 200) Y
xid string (External account id of the user. Maximum characters allowed is 50) Y
dob string (Date of birth of the user in the 'yyyy-MM-dd' format. Supported age range is from 13 to 100 years) Y
weight numeric (If weightUnit is provided as 'M' then minimum value is 34 and maximum value is 181. If weightUnit is provided as 'I' then minimum value is 75 and maximum value is 400) Y
weightUnit string (Unit code of the value used in 'weight' property, else defaults to the 'preferredUnit' property. Supported values are either "I" or "M") N
height numeric (If heightUnit is provided as 'M' then minimum value is 60 and maximum value is 310. If heightUnit is provided as 'I' then minimum value is 23.64 and maximum value is 122.04) N
heightUnit string (Unit code of the value used in 'height' property, else defaults to the 'preferredUnit' property. . Supported values are either "I" or "M") N
password string (Password of the user. If not specified, a random autogenerated password is set for the user. The password policy is: minimum 8 characters, at least one number is required, at least one upper case or lower case letter is required, at least one special character (!@#$%^&*) is required) N
firstName string (First name of the user. Maximum characters allowed is 200) N
lastName string (Last name of the user. Maximum characters allowed is 200) N
gender string (Gender of the user. Supported values are "m" or "f" ) N
preferredLanguageCode string (Language code of the user's preferred language. If not specified, the default value is "en". Supported values: [ en_US = US English, en = British English, fr = Français, de = Deutsch, nl = Nederlands, it = Italiano, es = Español, ja = 日本語, zh = 简体中文, pt = Português, ru = Pусский, tr = Türkçe, ca = Català, eu = Euskara, fi = Suomi, hu = Magyar, ko = 한국어, pl = Polski, zhl = 繁體中文, cy = Cymraeg, ar = العربية, he = עִברִית ] N
preferredUnit string (User's preferred Unit code. If not specified, Default value "I" will be set. Supported values are either "I" or "M") N
enabled boolean (User's enabled status. Supported values: true or false) N

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the user was successfully updated and their data is available in the body.

{
  "data":{
    "userAccessToken": "xyz123...",
    "userAccessTokenExpiry": 1677689984915,
    "emailAddress": "jane.doe@nowhere.com",
    "xid": "JN10001",
    "dob": "1990-01-30",
    "weight": 150.80,
    "weightUnit": "M",
    "height": 170.50,
    "heightUnit": "M",
    "firstName": "Jane",
    "lastName": "Doe",
    "gender": "f",
    "preferredLanguageCode": "en",
    "preferredUnit": "M",
    "facilityIdList": [20],
    "RFIDList": ["AA11BB22"],
    "age": 23,
    "enabled": true,
    "createdAt": "2023-02-16T18:48:37Z",
    "updatedAt": "2023-02-16T18:48:37Z",
  },
  "meta": {
  }
}
Parameter Type
data Object
data.userAccessToken string
data.userAccessTokenExpiry integer (Epoch time in millis indicating the expiry of the "userAccessToken" property)
data.emailAddress string
data.xid string
data.dob string (yyyy-MM-dd)
data.weight numeric
data.weightUnit string ("I"/"M") / NULL
data.height numeric / NULL
data.heightUnit string ("I"/"M") / NULL
data.firstName string / NULL
data.lastName string / NULL
data.gender string ("m"/"f") / NULL
data.preferredLanguageCode string
data.preferredUnit string ("I"/"M")
data.facilityIdList integer[] / NULL
data.RFIDList string[] / NULL
data.age integer
data.enabled boolean
data.createdAt string (ISO 8601)
data.updatedAt string (ISO 8601)
meta Object / NULL

Error

Errors returned from this endpoint can be one of the following

401
{
  "errorCode": "Authorization",
  "errorMessage": "Not authorized for resource.",
  "innerErrors": [
    {
      "errorCode": "ClientAccessTokenInvalid",
      "errorTarget": {
        "source": "Header",
        "key": "Authorization",
      }
    }
  ]
}

404
{
  "errorCode": "NotFound",
  "errorMessage": "The requested resource was not found.",
  "innerErrors": [
    {
      "errorCode": "UserNotFound",
      "errorTarget": {
        "source": "Header",
        "key": "user-access-token",
      }
    }
  ]
}

500
{
  "errorCode": "Fault",
  "errorMessage": "A server error occurred.",
  "innerErrors": []
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Delete User

Deletes a user corresponding to the provided user-access-token request header.

Endpoint

DELETE /api/v3/users

DELETE /api/v3/users HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location --request DELETE '{{BASE_URL}}/api/v3/users' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Response

Success

A successful response returns a HTTP Status Code: 204 - No Content. This indicates the user was successfully deleted.

Error

Errors returned from this endpoint can be one of the following

401
{
  "errorCode": "Authorization",
  "errorMessage": "Not authorized for resource.",
  "innerErrors": [
    {
      "errorCode": "ClientAccessTokenInvalid",
      "errorTarget": {
        "source": "Header",
        "key": "Authorization",
      }
    }
  ]
}

404
{
  "errorCode": "NotFound",
  "errorMessage": "The requested resource was not found.",
  "innerErrors": [
    {
      "errorCode": "UserNotFound",
      "errorTarget": {
        "source": "Header",
        "key": "user-access-token",
      }
    }
  ]
}

500
{
  "errorCode": "Fault",
  "errorMessage": "A server error occurred.",
  "innerErrors": []
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Get user profile image

Get the user profile image URLs.

Endpoint

GET /api/v3/users/photo

GET /api/v3/users/photo HTTP/1.1
Host: {{BASE_URL}}
user-access-token: xyz123
Authorization: Bearer eyAbc...
curl --location '{{BASE_URL}}/api/v3/users/photo' \
--header 'user-access-token: xyz123...'
--header 'Authorization: Bearer eyAbc...' \

Headers

Header Value
Accept application/json
Content-Type application/json
Authorization Bearer {oauth-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200

{
    "status": "SUCCESSFUL",
    "data": {
        "profileImage": {
            "image": "https://storage....",
            "thumbnail": "https://storage...."
        }
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.status string
data.profileImage Object
data.profileImage.image string
data.profileImage.thumbnail string
meta Object / NULL

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "Invalid Bearer token in Authorization header"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

500
{
  "errorCode": "Fault",
  "errorMessage": "A server error occurred.",
  "innerErrors": []
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

User Cardio Equipment Login

This section contains APIs which lets a user login remotely onto a connected cardio console.

User Cardio Login

This API lets a user login remotely into the cardio connected console with or without duration in seconds. The duration is used to auto log out the user in case of inactivity after successful cardio console login.

Endpoint

POST /api/v3/users/cardio-login

POST /api/v3/users/cardio-login HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
Content-Type: application/json
Content-Length: 399

{
    "bodySerial": "XYZ123456",
    "loginTimeout" : 8
}

curl --location '{{BASE_URL}}/api/v3/users/cardio-login' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...' \
--header 'Content-Type: application/json' \
--data-raw '{
    "bodySerial": "XYZ123456",
    "loginTimeout" : 8
  }'

Headers

Header Value
Accept application/json
Content-Type application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Body

Parameter Type Required
bodySerial string (Body serial of the equipment) Y
loginTimeout number (time in seconds for which user remains logged on the console due to inactivity) N

Response

Success

A successful response returns a HTTP Status Code: 201 - Created. This indicates the user was created successfully.

{
    "status": "SUCCESSFUL",
    "data": null,
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.status string

Error

Errors returned from this endpoint can be one of the following

401
{
  "errorCode": "Authorization",
  "errorMessage": "Not authorized for resource.",
  "innerErrors": [
    {
      "errorCode": "ClientAccessTokenInvalid",
      "errorTarget": {
        "source": "Header",
        "key": "Authorization",
      }
    }
  ]
}


422
{
  "errorCode": "Validation",
  "errorMessage": "The given data failed to pass validation.",
  "innerErrors": [
    {
      "errorCode": "RequiredValidation",
      "errorTarget": {
        "source": "Body",
        "key": "bodySerial",
      },
      "message":"The 'bodySerial' property is required."
    },
    {
      "errorCode": "StringValidation",
      "errorTarget": {
        "source": "Body",
        "key": "bodySerial",
      },
      "message":"The 'bodySerial' property must be a string."
    },
  ]
}

500
{
  "errorCode": "Fault",
  "errorMessage": "A server error occurred.",
  "innerErrors": []
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

User Cardio Login with Workout Preset

This API lets a user login remotely into the cardio connected console and start the workout preset with or without duration in seconds. The duration is used to auto log out the user in case of inactivity after successful cardio console login.

Endpoint

POST /api/v3/users/cardio-login

POST /api/v3/users/sso-login HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
Content-Type: application/json
Content-Length: 399

{
    "bodySerial": "XYZ123456",
    "loginTimeout" : 8,
    "workoutPresetId" : 32323
}

curl --location '{{BASE_URL}}/api/v3/users/sso-login' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...' \
--header 'Content-Type: application/json' \
--data-raw '{
    "bodySerial": "XYZ123456",
    "loginTimeout" : 8,
    "workoutPresetId" : 32323
  }'

Headers

Header Value
Accept application/json
Content-Type application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Body

Parameter Type Required
bodySerial string (Body serial of the equipment) Y
loginTimeout number (time in seconds for which user remains logged on the console due to inactivity) N
workoutPresetId number (workout preset id) Y

Response

Success

A successful response returns a HTTP Status Code: 201 - Created. This indicates the user was created successfully.

{
    "status": "SUCCESSFUL",
    "data": null,
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.status string

Error

Errors returned from this endpoint can be one of the following

401
{
  "errorCode": "Authorization",
  "errorMessage": "Not authorized for resource.",
  "innerErrors": [
    {
      "errorCode": "ClientAccessTokenInvalid",
      "errorTarget": {
        "source": "Header",
        "key": "Authorization",
      }
    }
  ]
}


422
{
  "errorCode": "Validation",
  "errorMessage": "The given data failed to pass validation.",
  "innerErrors": [
    {
      "errorCode": "RequiredValidation",
      "errorTarget": {
        "source": "Body",
        "key": "bodySerial",
      },
      "message":"The 'bodySerial' property is required."
    },
    {
      "errorCode": "StringValidation",
      "errorTarget": {
        "source": "Body",
        "key": "bodySerial",
      },
      "message":"The 'bodySerial' property must be a string."
    },
  ]
}

500
{
  "errorCode": "Fault",
  "errorMessage": "A server error occurred.",
  "innerErrors": []
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

User Cardio Login with Workout Type

This API lets a user login remotely into the cardio connected console and start the workout type with or without duration in seconds. The duration is used to auto log out the user in case of inactivity after successful cardio console login.

Endpoint

POST /api/v3/users/cardio-login

POST /api/v3/users/sso-login HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
Content-Type: application/json
Content-Length: 399

{
    "bodySerial": "XYZ123456",
    "loginTimeout" : 8,
    "workoutType": "PERFORMANCE_RUN"
}

curl --location '{{BASE_URL}}/api/v3/users/sso-login' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...' \
--header 'Content-Type: application/json' \
--data-raw '{
    "bodySerial": "XYZ123456",
    "loginTimeout" : 8,
    "workoutType": "PERFORMANCE_RUN"
  }'

Headers

Header Value
Accept application/json
Content-Type application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Body

Parameter Type Required
bodySerial string (Body serial of the equipment) Y
loginTimeout number (time in seconds for which user remains logged on the console due to inactivity) N
workoutType number (workout type. Supported values - PERFORMANCE_RUN) Y

Response

Success

A successful response returns a HTTP Status Code: 201 - Created. This indicates the user was created successfully.

{
    "status": "SUCCESSFUL",
    "data": null,
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.status string

Error

Errors returned from this endpoint can be one of the following

401
{
  "errorCode": "Authorization",
  "errorMessage": "Not authorized for resource.",
  "innerErrors": [
    {
      "errorCode": "ClientAccessTokenInvalid",
      "errorTarget": {
        "source": "Header",
        "key": "Authorization",
      }
    }
  ]
}


422
{
  "errorCode": "Validation",
  "errorMessage": "The given data failed to pass validation.",
  "innerErrors": [
    {
      "errorCode": "RequiredValidation",
      "errorTarget": {
        "source": "Body",
        "key": "bodySerial",
      },
      "message":"The 'bodySerial' property is required."
    },
    {
      "errorCode": "StringValidation",
      "errorTarget": {
        "source": "Body",
        "key": "bodySerial",
      },
      "message":"The 'bodySerial' property must be a string."
    },
  ]
}

500
{
  "errorCode": "Fault",
  "errorMessage": "A server error occurred.",
  "innerErrors": []
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

User Cardio Speeds

This section contains APIs which manage user speed settings.

Get User Cardio Speeds

Retrieve the cardio speeds of a user using the user-access-token in the user-access-token header.

Endpoint

GET /api/v3/users/cardio-speeds

GET /api/v3/users/cardio-speeds HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/users/cardio-speeds' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the user speeds were successfully retrieved and their data is available in the body.

{
  "data":{
    "walkSpeed": 2,
    "jogSpeed": 5,
    "runSpeed": 8,
    "speedUnit": "I",
  },
  "meta": {
  }
}
Parameter Type
data Object
data.walkSpeed numeric
data.jogSpeed numeric
data.runSpeed numeric
data.speedUnit string ("I"/"M") / NULL
meta Object / NULL

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4063,
        "errorMsg": "Failed to retrieve user speeds of the user"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Failed to retrieve user speeds of the user"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Update User Cardio Speeds

Set the cardio speeds for a user.

Endpoint

PUT /api/v3/users/user-speeds

PUT /api/v3/users/user-speeds HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc..
user-access-token: xyz123...
Content-Type: application/json
Content-Length: 399

{
  "walkSpeed": 2,
  "jogSpeed": 5,
  "runSpeed": 8,
  "speedUnit": "I"
}
curl --location '{{BASE_URL}}/api/v3/users/user-speeds' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'Content-Type: application/json' \
--header 'user-access-token: xyz123...'

--data-raw '
{
  "walkSpeed": 2,
  "jogSpeed": 5,
  "runSpeed": 8,
  "speedUnit": "I"
}'

Headers

Header Value
Accept application/json
Content-Type application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Body

Parameter Type Required
walkSpeed numeric (If speedUnit is provided as 'M' then minimum value is 0.5 and maximum value is 23.0. If weightUnit is provided as 'I' then minimum value is 0.3 and maximum value is 14.0. Walkspeed is always less than jogSpeed and runSpeed values) Y
jogSpeed numeric (If speedUnit is provided as 'M' then minimum value is 0.5 and maximum value is 23.0. If weightUnit is provided as 'I' then minimum value is 0.3 and maximum value is 14.0. jogSpeed is always greater than walkSpeed and less than runSpeed values) Y
runSpeed numeric (If speedUnit is provided as 'M' then minimum value is 0.5 and maximum value is 23.0. If weightUnit is provided as 'I' then minimum value is 0.3 and maximum value is 14.0. runSpeed is always greater than jogSpeed and runSpeed values) Y
speedUnit string (Unit code of the value used for speeds. Supported values are either "I" or "M") Y

Response

Success

A successful response returns a HTTP Status Code: 204 - Success. This indicates the user speeds were set successfully.

Error

Errors returned from this endpoint can be one of the following

401
{
  "errorCode": "Authorization",
  "errorMessage": "Not authorized for resource.",
  "innerErrors": [
    {
      "errorCode": "ClientAccessTokenInvalid",
      "errorTarget": {
        "source": "Header",
        "key": "Authorization",
      }
    }
  ]
}

422
{
  "errorCode": "Validation",
  "errorMessage": "The given data failed to pass validation.",
  "innerErrors": [
    {
      "errorCode": "RequiredValidation",
      "errorTarget": {
        "source": "Body",
        "key": "walkSpeed",
      },
      "message":"The 'walkSpeed' property is required."
    },
    {
      "errorCode": "RequiredValidation",
      "errorTarget": {
        "source": "Body",
        "key": "jogSpeed",
      },
      "message":"The 'jogSpeed' property is required."
    },
    {
      "errorCode": "RequiredValidation",
      "errorTarget": {
        "source": "Body",
        "key": "runSpeed",
      },
      "message":"The 'runSpeed' property is required."
    },
    {
      "errorCode": "UnitValidation",
      "errorTarget": {
        "source": "Body",
        "key": "speedUnit"
      },
      "message": "The 'speedUnit' property must be one of the following strings 'M' or 'I'."
    },
    {
      "errorCode": "NumericValidation",
      "errorTarget": {
          "source": "Body",
          "key": "walkSpeed"
      },
      "message": "The 'walkSpeed' property must be a numeric value with or without decimals."
    },
    {
      "errorCode": "NumericValidation",
      "errorTarget": {
          "source": "Body",
          "key": "jogSpeed"
      },
      "message": "The 'jogSpeed' property must be a numeric value with or without decimals."
    },
    {
      "errorCode": "NumericValidation",
      "errorTarget": {
          "source": "Body",
          "key": "runSpeed"
      },
      "message": "The 'runSpeed' property must be a numeric value with or without decimals."
    },
    {
      "errorCode": "RangeValidation",
      "errorTarget": {
          "source": "Body",
          "key": "walkSpeed, jogSpeed, runSpeed"
      },
      "message": "The 'walkSpeed, jogSpeed, runSpeed' properties must be within supported range."
    },
   
  ]
}

500
{
  "errorCode": "Fault",
  "errorMessage": "A server error occurred.",
  "innerErrors": []
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Delete User Cardio Speeds

Deletes a user's cardio speeds using the user-access-token in the user-access-token header.

Endpoint

DELETE /api/v3/users/cardio-speeds

DELETE /api/v3/users/cardio-speeds HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location --request DELETE '{{BASE_URL}}/api/v3/users/cardio-speeds' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Response

Success

A successful response returns a HTTP Status Code: 204 - No Content. This indicates the user's cardio speeds were successfully deleted.

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Cannot delete user cardio speeds"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Cannot delete user cardio speeds"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Get User Cardio Quick Speeds

Retrieve the quick speeds of a user using the user-access-token in the user-access-token header.

Endpoint

GET /api/v3/users/cardio-quick-speeds

GET /api/v3/users/user-speeds HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/users/user-speeds' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the user speeds were successfully retrieved and their data is available in the body.

{
  "data":{
    "quickSpeeds" : "2,4,6,8,10",
    "quickSpeedsUnit": "I"
  },
  "meta": {
  }
}
Parameter Type
data Object
data.quickSpeeds string
data.quickSpeedsUnit string ("I"/"M") / NULL
meta Object / NULL

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4063,
        "errorMsg": "Failed to retrieve user speeds of the user"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Failed to retrieve user speeds of the user"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Set User Cardio Quick Speeds

Set the quick speeds for a user.

Endpoint

PUT /api/v3/users/cardio-quick-speeds

PUT /api/v3/users/cardio-quick-speeds HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
Content-Type: application/json
Content-Length: 399

{
    "quickSpeeds" : "2,4,6,8,10",
    "quickSpeedsUnit": "I"
}
curl --location '{{BASE_URL}}/api/v3/users/cardio-quick-speeds' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'Content-Type: application/json' \
--data-raw '
{
    "quickSpeeds" : "2,4,6,8,10",
    "quickSpeedsUnit": "I"
}'

Headers

Header Value
Accept application/json
Content-Type application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Body

Parameter Type Required
quickSpeeds string (Comma-separated string of five quick speed numeric values in ascending order. If quickSpeedsUnit is provided as 'M' then minimum value is 0.5 and maximum value is 23.0. If weightUnit is provided as 'I' then minimum value is 0.3 and maximum value is 14.0) Y
quickSpeedsUnit string (Unit code of the value used for speeds. Supported values are either "I" or "M") Y

Response

Success

A successful response returns a HTTP Status Code: 204 - Success. This indicates the user quick speeds were set successfully.

Error

Errors returned from this endpoint can be one of the following

401
{
  "errorCode": "Authorization",
  "errorMessage": "Not authorized for resource.",
  "innerErrors": [
    {
      "errorCode": "ClientAccessTokenInvalid",
      "errorTarget": {
        "source": "Header",
        "key": "Authorization",
      }
    }
  ]
}

422
{
  "errorCode": "Validation",
  "errorMessage": "The given data failed to pass validation.",
  "innerErrors": [
    {
      "errorCode": "RequiredValidation",
      "errorTarget": {
        "source": "Body",
        "key": "quickSpeeds",
      },
      "message":"The 'quickSpeeds' property is required."
    },
    {
      "errorCode": "RequiredValidation",
      "errorTarget": {
        "source": "Body",
        "key": "quickSpeedsUnit",
      },
      "message":"The 'quickSpeedsUnit' property is required."
    },
    {
      "errorCode": "UnitValidation",
      "errorTarget": {
        "source": "Body",
        "key": "quickSpeedsUnit"
      },
      "message": "The 'quickSpeedsUnit' property must be one of the following strings 'M' or 'I'."
    },
    {
      "errorCode": "StringValidation",
      "errorTarget": {
        "source": "Body",
        "key": "quickSpeeds"
      },
      "message": "The 'quickSpeeds' property must be a string with five comma-separated numeric values"
    },
    {
      "errorCode": "RangeValidation",
      "errorTarget": {
          "source": "Body",
          "key": "quickSpeeds"
      },
      "message": "The 'quickSpeeds' property must be within supported range."
    },
   
  ]
}

500
{
  "errorCode": "Fault",
  "errorMessage": "A server error occurred.",
  "innerErrors": []
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Delete User Cardio Quick Speeds

Deletes a user's quick speeds using the user-access-token in the user-access-token header.

Endpoint

DELETE /api/v3/users/cardio-quick-speeds

DELETE /api/v3/users/cardio-quick-speeds HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location --request DELETE '{{BASE_URL}}/api/v3/users/cardio-quick-speeds' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Response

Success

A successful response returns a HTTP Status Code: 204 - No Content. This indicates the user's quick speeds were successfully deleted.

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Cannot delete user quick speeds"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Cannot delete user quick speeds"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

User RFID

This section contains the APIs corresponding to user RFID management

Assign User RFID

Updates the RFID assigned to a userusing the user-access-token in the user-access-token header.

Endpoint

POST /api/v3/users/rfid/{{rfid}}

POST /api/v3/users/rfid HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
{
	"rfId" : "RFID1"
}
curl --location '{{BASE_URL}}/api/v3/users/rfid' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'
--data '{
	"rfId" : "RFID1"
}'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Body

Parameter Type Required
rfId string Y

Response

Success

A successful response returns a HTTP Status Code: 204 - OK. This indicates the rfids has been successfully assigned to the user

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "Invalid user-access-token header"
    },
    "meta": null
}

422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1007,
        "errorMsg": "Missing parameter/s: Missing mandatory parameter - rfId"
    },
    "meta": null
}
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1007,
        "errorMsg": "rfid: (Maximum characters allowed is 50)"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 500,
        "errorMsg": "Error occurred while assigning RFID: "
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Get User Assigned RFID

Retrieves the RFIDs assigned to a user using the user-access-token in the user-access-token header.

Endpoint

GET /api/v3/users/rfid

GET /api/v3/users/rfid HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/users/rfid' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the rfids pertaining to the user were successfully retrieved and their data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "rfid": [
            "RFID1",
            "RFID2",
            "RFID3"
        ]
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.rfid Object[]
meta Object / NULL

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "Invalid user-access-token header"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Error occurred while retrieving RFID of current user"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Get RFID Assigned Status Information

Retrieves the user details and RFID assigned status.

Endpoint

GET /api/v3/users/rfid/{{rfid}}

GET /api/v3/users/rfid/{{rfid}} HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/users/rfid/RFID1' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the rfids information was successfully retrieved. UserId and email are returned in the response only if the user has authorized the clientId used in the API request.

{
    "status": "SUCCESSFUL",
    "data": {
        "rfId": "RFID1",
        "userAccessStatus": null,
        "userId": 1,
        "email": "user.info@info.com",
        "status": "ASSIGNED"
    },
    "error": null,
    "meta": null
}

{
    "status": "SUCCESSFUL",
    "data": {
        "rfId": "RFID1",
        "userAccessStatus": "Unauthorized to access user data",
        "userId": null,
        "email": null,
        "status": "ASSIGNED"
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.rfid string
data.userAccessStatus string ('Unauthorized to access user data'
data.userId numeric
data.email string
data.status string ('ASSIGNED'/'UNASSIGNED')
meta Object / NULL

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "Invalid user-access-token header"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "Unauthorized to access user data"
    },
    "meta": null
}


500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Error occurred while retrieving RFID of current user"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Update User existing RFID

Updates the RFID assigned to a user using the user-access-token in the user-access-token header.

Endpoint

PUT /api/v3/users/rfid/{{rfid}}

PUT /api/v3/users/rfid/{{rfid}} HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
{
	"rfId" : "1634225TestRFID3"
}
curl --location '{{BASE_URL}}/api/v3/users/rfid/{{RFID1}}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'
--data '{
	"rfId" : "RFID2"
}'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Body

Parameter Type Required
rfId string Y

Response

Success

A successful response returns a HTTP Status Code: 204 - OK. This indicates the rfids has been successfully updated

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "Invalid user-access-token header"
    },
    "meta": null
}

422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1007,
        "errorMsg": "Missing parameter/s: Missing mandatory parameter - rfid (New RFID to be updated)"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1007,
        "errorMsg": "Missing path parameter - rfid (Old RFID to be updated)"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1007,
        "errorMsg": "rfid: (Maximum characters allowed is 50)"
    },
    "meta": null
}
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1071,
        "errorMsg": "Missing parameter/s: Missing mandatory parameter - rfid (New RFID to be updated)"
    },
    "meta": null
}
    
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 422,
        "errorMsg": "Old RFID is not assigned to the current user"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 422,
        "errorMsg": "New RFID: is already assigned to the current user."
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 422,
        "errorMsg": "New RFID: is already assigned to another user"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Error occurred while retrieving RFID of current user"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Delete User RFID

Deletes the RFID assigned to a user using the user-access-token in the user-access-token header.

Endpoint

DELETE /api/v3/users/rfid/{{rfid}}

DELETE /api/v3/users/rfid/{{rfid}} HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/users/rfid/{{RFID1}}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Response

Success

A successful response returns a HTTP Status Code: 204 - OK. This indicates the rfid assigned to the user has been successfully deleted

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "Invalid user-access-token header"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1001,
        "errorMsg": "User not found"
    },
    "meta": null
}


422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1007,
        "errorMsg": "Missing parameters rfId"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 500,
        "errorMsg": "Error occurred while deleting RFID: "
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Strength Videos

This section contains the APIs corresponding to strength video links.

Get Strength Videos

Retrieves the Strength Videos by the given qrCodeURL

Endpoint

GET /api/v3/strength-videos

GET /api/v3/activities?qrCodeURL={{qrCodeURL}}&preferredUnit={{preferredUnit}}&userHeight={{userHeight}} HTTP/1.1
Host: {{BASE_URL}}
Authorization: Bearer eyAbc...
Accept: application/json
curl --location '{{BASE_URL}}/api/v3/activities?qrCodeURL={{qrCodeURL}}&preferredUnit={{preferredUnit}}&userHeight={{userHeight}}' \
--header 'Authorization: Bearer eyAbc...' \
--header 'Accept: application/json'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}

Query Parameters

Parameter Type Required
qrCodeURL string (QRcode URL of the Strength equipment) Y
userHeight numeric (If preferredUnit is provided as 'M' then minimum value is 149 cm and maximum value is 195 cm. If preferredUnit is provided as 'I' then minimum value is 59 inch and maximum value is 77 inch) N
preferredUnit string (User's preferred Unit code. If not specified, Default value "I" will be set. Supported values are either "I" or "M") N

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the strength videos for the qrCodeURL are retrieved successfully.

{
    "status": "SUCCESSFUL",
    "data": {
        "strengthEquipment": {
            "name": "fzpd",
            "officialTitle": "Pulldown",
            "video": [
                "http://youtube.com/embed/X-_nZ3oTFW8"
            ],
            "targetMuscles": "Biceps,Latissimus Dorsi",
            "workoutName": [
                "Pulldown"
            ],
            "totalWeight": 259,
            "weightStack": 145,
            "qrCodeURL": "https://lfconnect.com/q?t=s&m=fzpd",
            "preferredUnit": "M",
            "userHeight": 60,
            "label": "Seat Position",
            "labelValue": "1"
        }
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.name string
data.officialTitle string
data.video string[]
data.targetMuscles string
data.workoutName string[]
data.totalWeight numeric / 0
data.weightStack numeric / 0
data.qrCodeURL string
data.preferredUnit string ("I"/"M")
data.userHeight numeric / 0
data.label string
data.labelValue string

Error

Errors returned from this endpoint can be one of the following


422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 400,
        "errorMsg": "Missing Parameters: qrCodeURL"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 400,
        "errorMsg": "Missing Parameters: preferredUnit"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1213,
        "errorMsg": "qrCodeURL is not valid: ds"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1075,
        "errorMsg": "User height is not in the range for providing config information"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1074,
        "errorMsg": "Cannot retrieve the Strength equipment video links"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Equipment

This section contains the APIs corresponding to equipment data.

Get Equipment Info

Retrieves the Equipment details.

Endpoint

GET /api/v3/facilities/{facilityId}/equipments/{bodySerial}

GET /api/v3/facilities/{facilityId}/equipments/{bodySerial} HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
curl --location 'https://{{BASE_URL}}/api/v3/facilities/{facilityId}/equipments/{bodySerial}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the facility information was successfully retrieved and their data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "equipment": {
            "id": 1,
            "facilityId": 1,
            "bodySerial": "XYZ123",
            "bodySerialOnboarding": "XYZ123",
            "consoleSerial": "ConsoleSerial1",
            "baseSerial": "",
            "motorSerial": "",
            "modelId": 50,
            "createdAt": "2017-07-28T06:05:18.293+00:00",
            "updatedAt": "2021-11-22T16:15:16.882+00:00",
            "tunerId": 218,
            "name": null,
            "displayName": "Equipment1",
            "ipAddress": "00.00.00.00",
            "bluetoothMacAddress": null,
            "attachToFacilityDate": null,
            "lastHeardAt": "2017-09-06T06:41:37.555+00:00",
            "onlineStatus": false,
            "activityId": 4,
            "activityName": "CROSSTRAINER_DISCOVER_ENGAGE_DEVICE_TYPE",
            "pushServerId": 1,
            "softwareVersion": "0201003"
        }
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.equipment Object
data.equipment.id numeric
data.equipment.facilityId numeric
data.equipment.bodySerial string
data.equipment.bodySerialOnBoarding string
data.equipment.consoleSerial string
data.equipment.baseSerial string
data.equipment.motorSerial string
data.equipment.modelId numeric
data.equipment.createdAt string
data.equipment.updatedAt string
data.equipment.tunerId numeric
data.equipment.name string
data.equipment.displayName string
data.equipment.ipAddress string
data.equipment.bluetoothMacAddress string
data.equipment.attachToFacilityDate string
data.equipment.lastHeardAt string
data.equipment.onlineStatus boolean
data.equipment.activityId numeric
data.equipment.activityName string
data.equipment.pushServerId numeric
data.equipment.softwareVersion string

Error

Errors returned from this endpoint can be one of the following


401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "UnAuthorized"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 404,
        "errorMsg": "Not found:  - bodySerial: XYZ123"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 3048,
        "errorMsg": "Equipment doesn't belong to the facility - bodySerial: XYZ123"
    },
    "meta": null
}

422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2001,
        "errorMsg": "Missing parameter/s: facilityId path parameter is required"
    },
    "meta": null
}


422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2001,
        "errorMsg": "Missing parameter/s: bodySerial path parameter is required"
    },
    "meta": null
}


500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2005,
        "errorMsg": "Error retrieving equipemnt details. bodySerial: XYZ123"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Get Equipment Usage Statistics

Retrieves the Equipment usage statistics.

Endpoint

GET /api/v3/facilities/{facilityId}/equipments/{bodySerial}/stats

GET /api/v3/facilities/{facilityId}/equipments/{bodySerial}/stats HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
curl --location 'https://{{BASE_URL}}/api/v3/facilities/{facilityId}/equipments/{bodySerial}/stats' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the facility information was successfully retrieved and their data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "equipment": {
            "bodySerial": "XYZ123",
            "stats": {
                "totalDistance": 190945,
                "totalTime": 9709,
                "totalWorkoutCount": 335,
                "totalBeltTime": 9694,
                "totalBeltDistance": 190720,
                "totalLiftTime": 0
            }
        }
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.equipment Object
data.equipment.bodySerial string
data.equipment.stats Object
data.equipment.stats.totalDistance numeric
data.equipment.stats.totalTime numeric
data.equipment.stats.totalWorkoutCount numeric
data.equipment.stats.totalBeltTime numeric
data.equipment.stats.totalBeltDistance numeric
data.equipment.stats.totalLiftTime numeric

Error

Errors returned from this endpoint can be one of the following


401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "UnAuthorized"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 404,
        "errorMsg": "Not found:  - bodySerial: XYZ123"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 3048,
        "errorMsg": "Equipment doesn't belong to the facility - bodySerial: XYZ123"
    },
    "meta": null
}

422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2001,
        "errorMsg": "Missing parameter/s: facilityId"
    },
    "meta": null
}


422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2001,
        "errorMsg": "Missing parameter/s: equipment serial"
    },
    "meta": null
}


500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2005,
        "errorMsg": "Error while fetching equipment stats bodySerial:  XYZ123"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Get Equipment Online Status

Retrieves the Equipment online status at the given timestamp.

Endpoint

GET /api/v3/facilities/{facilityId}/equipments/{bodySerial}/online-at/{timestamp}

GET /api/v3/facilities/{facilityId}/equipments/{bodySerial}/online-at/{timestamp} HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
curl --location 'https://{{BASE_URL}}/api/v3/facilities/{facilityId}/equipments/{bodySerial}/online-at/{timestamp}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the facility information was successfully retrieved and their data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "equipment": {
            "bodySerial": "XYZ123",
            "online": true
        }
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.equipment Object
data.equipment.bodySerial string
data.equipment.online boolean

Error

Errors returned from this endpoint can be one of the following


401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "UnAuthorized"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 404,
        "errorMsg": "Not found:  - bodySerial: XYZ123"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 3048,
        "errorMsg": "Equipment doesn't belong to the facility - bodySerial: XYZ123"
    },
    "meta": null
}

422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2001,
        "errorMsg": "Missing parameter/s: facilityId"
    },
    "meta": null
}


422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2001,
        "errorMsg": "Missing parameter/s: equipment serial"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 3042,
        "errorMsg": "Not a valid Timestamp: timestamp not in correct format: 2024-04-29"
    },
    "meta": null
}


500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 3043,
        "errorMsg": "Asset Online status not found"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Load Web Page on Cardio Equipment

View a web page on a compatible cardio console with an max optional duration in seconds not to exceed 180 seconds.

Endpoint

POST /api/v3/equipments/{bodySerial}/load-web-page

GET /api/v3/equipments/{bodySerial}/load-web-page HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
curl --location 'https://{{BASE_URL}}/api/v3/equipments/{bodySerial}/load-web-page' \
--header 'Authorization: eyAbc...' \
--data '{
    "url": "https://www.google.com",
    "duration": 5
}'

Headers

Header Value
Authorization Bearer {oauth-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the facility information was successfully retrieved and their data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "duration": 5,
        "bodySerial": "SMT-UKMDNO",
        "url": "https://www.google.com"
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.bodySerial string
data.url string
data.duration number

Error

Errors returned from this endpoint can be one of the following


401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "UnAuthorized"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 3001,
        "errorMsg": "Missing parameter/s: url"
    },
    "meta": null
}

422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 3044,
        "errorMsg": "Invalid duration  - duration: -5"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 3041,
        "errorMsg": "Not a valid URL"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 3049,
        "errorMsg": "Max duration (180) exceeded - duration: 589599"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 3043,
        "errorMsg": "Asset Online status not found"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error object Includes the error details
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Facility

This section contains the APIs corresponding to facility data.

Get Facility info

Retrieves the facility information for given Facility Id

Endpoint

GET /api/v3/facilities/{facilityId}

GET /api/v3/facilities/{facilityId} HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
curl --location 'https://{{BASE_URL}}/api/v3/facilities/{facilityId}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the facility information was successfully retrieved and their data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "country": "US",
        "facilityId": 1,
        "address": "Street No.1",
        "city": "Chicago",
        "phone": "123-123-1234",
        "timezone": "America/Chicago",
        "postalCode": "600007",
        "ipAddress": "10.10.10.10",
        "facilityName": "Facility 1",
        "state": "IL"
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.country string
data.facilityId numeric
data.address string
data.city string
data.phone string
data.timezone string
data.postalCode string
data.ipAddress string
data.facilityName string
data.state string

Error

Errors returned from this endpoint can be one of the following


401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "Invalid Bearer token in Authorization header"
    },
    "meta": null
}


422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2005,
        "errorMsg": "Facility not found Invalid facilityId"
    },
    "meta": null
}

Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Get Facility Equipments

Retrieves the list of equipments with details for the given facility id.

Endpoint

GET /api/v3/facilities/{facilityId}/equipments

GET /api/v3/facilities/{facilityId}/equipments HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
curl --location 'https://{{BASE_URL}}/api/v3/facilities/{facilityId}/equipments' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the facility equipment list was successfully retrieved and their data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": [
        {
            "bodySerial": "BODYSERIAL1",
            "modelId": 68,
            "name": "EQUIPMENTNAME1",
            "activityId": 1,
            "activityName": "ACTIVITYNAME1",
            "facilityId": 1,
            "onlineStatus": true,
            "secondaryEquipmentSerial": "SECONDARYSERIAL1",
            "baseSerialNumber": "BASESERIAL1",
            "consoleSerial": "CONSOLESERIAL1",
            "softwareVersion": "123"
        },
        {
            "bodySerial": "BODYSERIAL2",
            "modelId": 68,
            "name": "EQUIPMENTNAME2",
            "activityId": 1,
            "activityName": "ACTIVITYNAME2",
            "facilityId": 1,
            "onlineStatus": true,
            "secondaryEquipmentSerial": "SECONDARYSERIAL2",
            "baseSerialNumber": "BASESERIAL2",
            "consoleSerial": "CONSOLESERIAL2",
            "softwareVersion": "123"
        }
    ],
    "error": null,
    "meta": null
}
Parameter Type
data Object[]
data.bodySerial string ( Format: 'SMT-902170' OR '00:11:22:33:44:55' OR '3bd07ceb-e842-4a14-b6c5-ff3270e195c')
data.modelId numeric
data.name string
data.activityId numeric ( Type of Equipment - 1/2/3 ... )
data.activityName string ( Name of the Type of Equipment - Treadmill/ Cross-Trainer / Upright Bike ...)
data.facilityId numeric
data.onlineStatus boolean ( true/ false)
data.secondaryEquipmentSerial string ( Format: 'SMT-902170' - Only available when bodySerial is of the format - '00:11:22:33:44:55'/ '3bd07ceb-e842-4a14-b6c5-ff3270e195c')
data.baseSerialNumber string ( Serial number of the Base when relevant)
data.consoleSerial string (Serial number of the console when relevant)
data.softwareVersion string

Error

Errors returned from this endpoint can be one of the following


401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "Invalid Bearer token in Authorization header"
    },
    "meta": null
}


422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2005,
        "errorMsg": "Facility not found  Invalid facilityId "
    },
    "meta": null
}

Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Initiate Facility SSO

Initiate SSO Login for a facility. Please save the ssoKey returned upon a succesful request. This SSOKey is required for subsequent SSO related API calls for the facility.

Endpoint

POST /api/v3/facilities/{facilityId}/sso

POST /api/v3/facilities/{facilityId}/sso HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...

{
    "facilityId": {facilityId}
}
curl --location '{{BASE_URL}}/api/v3/facilities/{facilityId}/sso' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--data-raw '{
    "facilityId": 20892389
}'

Headers

Header Value
Accept application/json
Content-Type application/json
Authorization Bearer {oauth-access-token}

Body

Parameter Type Required
facilityId integer (Id of the Facility) Y

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the facility sso information was successfully retrieved and the data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "facilitySSO": {
            "facilityId": 20892389,
            "ssoEnabled": false,
            "ssoKey": "SSOKeyAssignedToTheFacility",
            "webURL": null
        }
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.facilitySSO.facilityId integer
data.facilitySSO.ssoKey string
data.facilitySSO.ssoEnabled boolean
data.facilitySSO.webURL string
meta Object / NULL

Error

Errors returned from this endpoint can be one of the following

400
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2027,
        "errorMsg": "Facility SSO cannot be initialized - facilityId: {facilityId}"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2005,
        "errorMsg": "Facility not found  - facilityId: {facilityId}"
    },
    "meta": null
}

Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Get Facility SSO Information

Retrieves the SSO information of a facility.

Endpoint

GET /api/v3/facilities/{facilityId}/sso

GET /api/v3/facilities/{facilityId}/sso HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
curl --location '{{BASE_URL}}/api/v3/facilities/{facilityId}/sso' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the facility sso information was successfully retrieved and the data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "facilitySSO": {
            "facilityId": 20892389,
            "ssoEnabled": true,
            "ssoKey": "XXXX-MaskedSSOKeyAssignedToTheFacility",
            "webURL": "https://test.com/login.html"
        }
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.facilitySSO.facilityId integer
data.facilitySSO.ssoKey string
data.facilitySSO.ssoEnabled boolean
data.facilitySSO.webURL string
meta Object / NULL

Error

Errors returned from this endpoint can be one of the following


404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2028,
        "errorMsg": "Facility SSO not found - facilityId: {facilityId}"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2005,
        "errorMsg": "Facility not found  - facilityId: {facilityId}"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Update Facility SSO

Updates facility SSO information using the ssoKey. This API can enable or disable the facility SSO and can also update the login webURL.

Endpoint

PUT /api/v3/facilities/{facilityId}/sso

PUT /api/v3/facilities/{facilityId}/sso HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...

{
    "webURL": "https://test.com/login.html?bodySerial123",
    "ssoKey" : "SSOKeyAssignedToTheFacility",
    "ssoEnabled" : true
}
curl --location '{{BASE_URL}}/api/v3/facilities/{facilityId}/sso' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--data-raw '{
    "webURL": "https://test.com/login.html"
    "ssoKey" : "SSOKeyAssignedToTheFacility",
    "ssoEnabled" : true
}'

Headers

Header Value
Accept application/json
Content-Type application/json
Authorization Bearer {oauth-access-token}

Body

Parameter Type Required
webURL string (URL to the page the user has to be redirected to for Single Sign on. Required if SSO Enabled is set to true for the facility) Y
ssoKey string (SSO Key assigned to the facility and returned in the SSO Initiation API response) Y
ssoEnabled boolean (true/false) Y

Response

Success

A successful response returns a HTTP Status Code: 204 - No content.

Error

Errors returned from this endpoint can be one of the following

400

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2001,
        "errorMsg": "Missing parameter/s:  - ssoKey "
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2001,
        "errorMsg": "Missing parameter/s:  - ssoEnabled: "
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2001,
        "errorMsg": "Missing parameter/s:  - webURL"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2005,
        "errorMsg": "Facility not found  - facilityId: {facilityId}"
    },
    "meta": null
}

422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2018,
        "errorMsg": "Facility SSO Key check failed - facilityId: {facilityId}"
    },
    "meta": null
}

Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Delete Facility SSO

Delete facility SSO information using the ssoKey.

Endpoint

DELETE /api/v3/facilities/{facilityId}/sso

DELETE /api/v3/facilities/10/sso HTTP/1.1
Host: {{BASE_URL}}
Authorization: Bearer eyAbc...
Content-Type: application/json

{
    "ssoKey": "SSOKeyAssignedToTheFacility"
}
curl --location --request DELETE '{{BASE_URL}}/api/v3/facilities/10/sso' \
--header 'Authorization: Bearer eyAbc...' \
--header 'Content-Type: application/json' \
--data '{
    "ssoKey": "SSOKeyAssignedToTheFacility"
}'

Headers

Header Value
Accept application/json
Content-Type application/json
Authorization Bearer {oauth-access-token}

Body

Parameter Type Required
ssoKey string (SSO Key assigned to the facility and returned in the SSO Initiation API response) Y

Response

Success

A successful response returns a HTTP Status Code: 204 - No content.

Error

Errors returned from this endpoint can be one of the following

400

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2001,
        "errorMsg": "Missing parameter/s:  - ssoKey "
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2005,
        "errorMsg": "Facility not found  - facilityId: {facilityId}"
    },
    "meta": null
}

422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 2018,
        "errorMsg": "Facility SSO Key check failed - facilityId: {facilityId}"
    },
    "meta": null
}

Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

QR

The QR API can be used for multiple use cases. Please refer to this documentation for detailed information on the different use cases supported by this API - https://haloapisupport.zendesk.com/hc/en-us/articles/360053705793

QR API - User Cardio Login

The API is used to log in a user any Life Fitness cardio equipment

Endpoint

POST /api/v3/qr

POST /api/v3/qr HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
Content-Type: application/json
Content-Length: 399

{
 "qrCodeURL": "https://lfconnect.com/q?t=c&l=XYZ123456",
 "workoutId": 30367
}

curl --location '{{BASE_URL}}/api/v3/qr' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'
--header 'Content-Type: application/json' \
--data-raw '{
 "qrCodeURL": "https://lfconnect.com/q?t=c&l=XYZ123456",
 "workoutId": 30367
}'

Headers

Header Value
Accept application/json
Content-Type application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Body

Parameter Type Required
qrcodeURL string Y
workoutId numeric N

QRcode formats possible for this use case:

Response

Success

A successful response returns a HTTP Status Code: 200 - Success. This indicates the workout result is succesffuly saved to the user.

{
    "status": "SUCCESSFUL",
    "data": {
        "type": "cardioLogin"
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.type string
meta Object / NULL

Error

Errors returned from this endpoint can be one of the following

401
{
    "error": "invalid_token",
    "message": "Authorization failed : Missing or Invalid Bearer Token"
}

401 
{
    "errorCode": 401,
    "errorMessage": "`user-access-token` header is either missing or invalid"
}


404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 3003,
        "errorMsg": "Asset not found - bodySerial: "
    },
    "meta": null
}


422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 400,
        "errorMsg": "Missing Parameters:  - qrcodeURL"
    },
    "meta": null
}
     

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4043,
        "errorMsg": "User cannot be logged in"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

QR API - Get Strength Videos

The API can be used to receive strength equipment workout videos when the QR code on the equipment is scanned by the user.

Endpoint

POST /api/v3/qr

POST /api/v3/qr HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
Content-Type: application/json
Content-Length: 399

{
 "qrCodeURL” : "https://lfconnect.com/q?t=s&m=sbsdip",
 "preferredUnit": "M",
 "userHeight": 68
}  
curl --location '{{BASE_URL}}/api/v3/qr' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'Content-Type: application/json' \
--data-raw '{
 "qrCodeURL” : "https://lfconnect.com/q?t=s&m=sbsdip",
 "preferredUnit": "M",
 "userHeight": 68
} '

Headers

Header Value
Accept application/json
Content-Type application/json
Authorization Bearer {oauth-access-token}

Body

Parameter Type Required
qrcodeURL string (sample QRcode for strength equipment - https://lfconnect.com/q?t=s&m={{modelId}}) Y
userHeight numeric (If preferredUnit is provided as 'M' then minimum value is 60 and maximum value is 310. If preferredUnit is provided as 'I' then minimum value is 23.64 and maximum value is 122.04) N
preferredUnit string (User's preferred Unit code. If not specified, Default value "I" will be set. Supported values are either "I" or "M") N

Response

Success

A successful response returns a HTTP Status Code: 200 - Success. This indicates the strength video details are retrieved successfully.

{
    "status": "SUCCESSFUL",
    "data": {
        "type": "strengthvideos",
        "video": {
            "name": "fzab",
            "officialTitle": "Abdominal",
            "video": [
                "http://youtube.com/embed/sqW1om6uCfE"
            ],
            "videos3": null,
            "targetMuscles": "Abdominals",
            "workoutName": [
                "Abdominal"
            ],
            "totalWeight": 216,
            "weightStack": 95,
            "qrCodeURL": null,
            "preferredUnit": null,
            "userHeight": 0,
            "label": "Seat Position",
            "labelValue": "1"
        }
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.type string
data.video Object
data.video.name string
data.video.video string[]
data.video.videos3 string[]
data.video.targetMuscles string
data.video.weightStack numeric / NULL
data.video.qrcodeURL string / NULL
data.video.preferredUnit string ("I"/"M") / NULL
data.video.userHeight numeric
data.video.label string / NULL
data.video.labelValue string / NULL
meta Object / NULL

Error

Errors returned from this endpoint can be one of the following

401
{
  "errorCode": "Authorization",
  "errorMessage": "Not authorized for resource.",
  "innerErrors": [
    {
      "errorCode": "ClientAccessTokenInvalid",
      "errorTarget": {
        "source": "Header",
        "key": "Authorization",
      }
    }
  ]
}


422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 400,
        "errorMsg": "Missing Parameters:  - qrcodeURL"
    },
    "meta": null
}
     

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 1074,
        "errorMsg": "Cannot retrieve the Strength equipment video links"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

QR API - Save User Cardio results

The API is used to save a workout result to a user profile.

Endpoint

POST /api/v3/qr

POST /api/v3/qr HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
Content-Type: application/json
Content-Length: 399

{ 
  "qrCodeURL" : "https://halo.fitness/q?t=c&r=eyJpZCI6IjFmN2FiY2RhLXRjMGUtNGI2Zi04NzczLTIzYjIwMTIwMjQyYiIsImJzIjoiU01ULVVLTUROTyIsInQiOiI2OCIsImR0IjoiMjAxOS0xMi0xNlQxNTo1NDozNy0wNjowMCIsImV0IjoiNjMiLCJjIjoiMyIsImQiOnsidSI6IjAiLCJ2IjoiMC4xNzM5In0sImRjIjp7InUiOiIwIiwidiI6IjI3MzAuMDAwMCJ9LCJhcyI6eyJ1IjoiMCIsInYiOiI5LjkzNjUifSwiYXAiOnsidSI6IjAiLCJ2IjoiNjowMiJ9LCJhaSI6IjUuMDAwMCIsImFsIjoiMC4wMDAwIiwiYWhyIjoiMCIsImFtIjoiMCIsImF3IjoiMCIsImFyIjoiMC4wIiwiYXNwbSI6IjAuMCIsImFzbCI6IjAuMCJ9"
}
curl --location '{{BASE_URL}}/api/v3/qr' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...' \
--header 'Content-Type: application/json' \
--data-raw '{ "qrCodeURL" : "https://halo.fitness/q?t=c&r=eyJpZCI6IjFmN2FiY2RhLXRjMGUtNGI2Zi04NzczLTIzYjIwMTIwMjQyYiIsImJzIjoiU01ULVVLTUROTyIsInQiOiI2OCIsImR0IjoiMjAxOS0xMi0xNlQxNTo1NDozNy0wNjowMCIsImV0IjoiNjMiLCJjIjoiMyIsImQiOnsidSI6IjAiLCJ2IjoiMC4xNzM5In0sImRjIjp7InUiOiIwIiwidiI6IjI3MzAuMDAwMCJ9LCJhcyI6eyJ1IjoiMCIsInYiOiI5LjkzNjUifSwiYXAiOnsidSI6IjAiLCJ2IjoiNjowMiJ9LCJhaSI6IjUuMDAwMCIsImFsIjoiMC4wMDAwIiwiYWhyIjoiMCIsImFtIjoiMCIsImF3IjoiMCIsImFyIjoiMC4wIiwiYXNwbSI6IjAuMCIsImFzbCI6IjAuMCJ9"
} '

Headers

Header Value
Accept application/json
Content-Type application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Body

Parameter Type Required
qrcodeURL string (sample: https://lfconnect.com/q?t=c&r={{Base64 encoded workout result}}) Y

Response

Success

A successful response returns a HTTP Status Code: 200 - Success. This indicates the workout result is succesffuly saved to the user.

{
    "status": "SUCCESSFUL",
    "data": {
        "type": "cardioWorkoutData",
        "workoutId": 1234
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.type string
data.workoutId numeric
meta Object / NULL

Error

Errors returned from this endpoint can be one of the following

401
{
  "errorCode": "Authorization",
  "errorMessage": "Not authorized for resource.",
  "innerErrors": [
    {
      "errorCode": "ClientAccessTokenInvalid",
      "errorTarget": {
        "source": "Header",
        "key": "Authorization",
      }
    }
  ]
}


422
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 400,
        "errorMsg": "Missing Parameters:  - qrcodeURL"
    },
    "meta": null
}
     

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4043,
        "errorMsg": "Workout cannot be saved"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Cardio Workout Results

This section contains APIs which manage a user's cardio workout results

Get Daily Workout Results

Retrieves daily Workout results posted by User between the specified dates. This service returns all the individual workout results aggregated by date.

Endpoint

GET /api/v3/workout-results/daily?fromDate={fromDate}&toDate={toDate}&timezone={timeZone}

GET /api/v3/workout-results/daily?fromDate={fromDate}&toDate={toDate}&timezone={timeZone} HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/workout-results/daily?fromDate=01/01/2024&toDate=01/01/2025&timezone=GMT' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Query Parameters

Key Value
fromDate Date (mm/DD/yyyy)
toDate Date (mm/DD/yyyy)
timezone timezone (formats allowed - GMT/ GMT+0010 / 'America/Chicago')

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout results are successfully retrieved and data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "workoutResults": [
            {
                "date": "2024-02-27T06:00:00.000+00:00",
                "distance": 0.1739,
                "duration": 1.05,
                "calorie": 3.0,
                "strengthData": [
                    {
                        "calorie": 10.5,
                        "date": "2024-02-27T06:00:00.000+00:00",
                        "resultSet": [
                            {
                            "setNumber": 1,
                            "repetitionsCount": 1,
                            "resistanceWeight": 8.818
                            }
                        ]
                   }
                ],
                "cardioData": [
                    {
                        "equipmentId": 1,
                        "equipmentName": "Treadmill",
                        "workoutName": "Manual Goals",
                        "distance": 0.1739,
                        "duration": 1.05,
                        "calorie": 3.0,
                        "date": "2024-02-27T21:54:37.000+00:00",
                        "guid": "GUID1",
                        "workoutPresetId": null,
                        "workoutPresetName": null
                    }
                ],
                "unit": "I"
            },
            {
                "date": "2024-03-07T06:00:00.000+00:00",
                "distance": 0.5797000000000001,
                "duration": 29.6,
                "calorie": 41.0,
                "strengthData": [],
                "cardioData": [
                    {
                        "equipmentId": 1,
                        "equipmentName": "Treadmill",
                        "workoutName": "Manual Goals",
                        "distance": 0.536,
                        "duration": 26.8,
                        "calorie": 38.0,
                        "date": "2024-03-07T16:59:13.000+00:00",
                        "guid": "GUID2",
                        "workoutPresetId": null,
                        "workoutPresetName": null
                    },
                    {
                        "equipmentId": 16,
                        "equipmentName": "PowerMill Climber",
                        "workoutName": "Manual Goals",
                        "distance": 0.0,
                        "duration": 0.26666666666666666,
                        "calorie": 0.0,
                        "date": "2024-03-07T17:31:03.000+00:00",
                        "guid": "GUID2",
                        "workoutPresetId": null,
                        "workoutPresetName": null
                    }
                ],
                "unit": "I"
            }
        ]
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.workoutResults Object[]
workoutResults.date string (ISO 8601)
workoutResults.duration numeric
workoutResults.distance numeric
workoutResults.cardioData Object[]
workoutResults.cardioData.equipmentId numeric
workoutResults.cardioData.equipmentName string
workoutResults.cardioData.workoutName string
workoutResults.cardioData.distance numeric
workoutResults.cardioData.duration numeric
workoutResults.cardioData.calorie numeric
workoutResults.cardioData.date string (ISO 8601)
workoutResults.cardioData.guid string
workoutResults.cardioData.workoutPresetId numeric
workoutResults.cardioData.workoutPresetName string
workoutResults.strengthData Object[]
workoutResults.strengthData.workoutName string
workoutResults.strengthData.calorie numeric
workoutResults.strengthData.date string (ISO 8601)
workoutResults.strengthData.resultSet Object[]
workoutResults.strengthData.resultSet.setNumber numeric
workoutResults.strengthData.resultSet.repetitionsCount numeric
workoutResults.strengthData.resultSet.resistanceWeight numeric
meta Object / NULL

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4063,
        "errorMsg": "Workout queue cannot be retrieved"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4063,
        "errorMsg": "Workout queue cannot be retrieved"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Get Workout Results by Date Range

Retrieves the workout details of the user between the provided date range

Endpoint

GET /api/v3/workout-results/lifefitness?fromDate={fromDate}&toDate={toDate}&timezone={timeZone}

GET /api/v3/workout-results/lifefitness?fromDate={fromDate}&toDate={toDate}&timezone={timeZone} HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/workout-results/lifefitness?fromDate=01/01/2024&toDate=01/01/2025&timezone=GMT' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Query Parameters

Key Value
fromDate Date (mm/DD/yyyy)
toDate Date (mm/DD/yyyy)
timezone timezone (formats allowed - GMT/ GMT+0010 / 'America/Chicago')

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout results are successfully retrieved and data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "workoutResults": [
            {
                "date": "2024-02-27T21:54:37.000+00:00",
                "distance": 0.1739,
                "duration": 1.05,
                "calorie": 3.0,
                "equipmentId": 1,
                "equipmentName": "Treadmill",
                "score": null,
                "workoutName": "Manual Goals",
                "level": 0.0,
                "pace": 6.03,
                "incline": 5.0,
                "averageSpeed": 9.94,
                "averageHeartRate": 0.0,
                "distanceClimbed": 2730.0,
                "paceTime": null,
                "paceSpeed": null,
                "floorsClimbed": null,
                "watts": 0.0,
                "mets": 0.0,
                "rank": null,
                "runTime": null,
                "strideLength": 0.0,
                "steps": null,
                "floors": null,
                "rpm": null,
                "unit": "I",
                "workoutPresetId": null,
                "guid": "GUID1",
                "workoutPresetName": null,
                "rowersPace": null,
                "avgStrokesPerMin": null
            },
            {
                "date": "2024-03-07T16:59:13.000+00:00",
                "distance": 0.536,
                "duration": 26.8,
                "calorie": 38.0,
                "equipmentId": 1,
                "equipmentName": "Treadmill",
                "score": null,
                "workoutName": "Manual Goals",
                "level": 0.0,
                "pace": 50.0,
                "incline": 0.0,
                "averageSpeed": 1.2,
                "averageHeartRate": 0.0,
                "distanceClimbed": 0.0,
                "paceTime": null,
                "paceSpeed": null,
                "floorsClimbed": null,
                "watts": 0.0,
                "mets": 0.0,
                "rank": null,
                "runTime": null,
                "strideLength": 0.0,
                "steps": null,
                "floors": null,
                "rpm": null,
                "unit": "I",
                "workoutPresetId": null,
                "guid": "GUID2",
                "workoutPresetName": null,
                "rowersPace": null,
                "avgStrokesPerMin": null
            }
        ]
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.resultWorkoutData Object[]
resultWorkoutData.distance numeric
resultWorkoutData.workoutName string
resultWorkoutData.distanceClimbed numeric
resultWorkoutData.equipmentId numeric
resultWorkoutData.duration numeric
resultWorkoutData.score numeric
resultWorkoutData.watts numeric
resultWorkoutData.floors numeric
resultWorkoutData.workoutPresetId numeric
resultWorkoutData.workoutPresetName string
resultWorkoutData.rank numeric
resultWorkoutData.equipmentName string
resultWorkoutData.incline numeric
resultWorkoutData.averageHeartRate numeric
resultWorkoutData.runTime numeric
resultWorkoutData.rowersPace numeric
resultWorkoutData.paceSpeed numeric
resultWorkoutData.mets numeric
resultWorkoutData.level numeric
resultWorkoutData.paceTime numeric
resultWorkoutData.pace numeric
resultWorkoutData.averageSpeed numeric
resultWorkoutData.strideLength numeric
resultWorkoutData.steps numeric
resultWorkoutData.avgStrokesPerMin numeric
resultWorkoutData.rpm numeric
resultWorkoutData.calorie numeric
resultWorkoutData.guid string
resultWorkoutData.floorsClimbed numeric
resultWorkoutData.unit string ("I"/"M") / NULL
resultWorkoutData.date string (ISO 8601)
meta Object / NULL

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4063,
        "errorMsg": "Workout queue cannot be retrieved"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4063,
        "errorMsg": "Workout queue cannot be retrieved"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Get Workout Results by Date-Time Range

Retrieves the workout details of the user between the provided date-time range

Endpoint

GET /api/v3/workout-results/lifefitness/time-range?fromDateTime={fromDateTime}&toDateTime={toDateTime}&timezone={timeZone}

GET /api/v3/workout-results/lifefitness/time-range?fromDateTime={fromDateTime}&toDateTime={toDateTime}&timezone={timeZone} HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/workout-results/lifefitness/time-range?fromDateTime=01/01/2024&toDateTime=01/01/2025&timezone=GMT' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Query Parameters

Key Value Example
fromDateTime Date Time (yyyy-mm-DDTHH:MM:ss) 2024-06-25T15:00:37
toDateTime Date Time (yyyy-mm-DDTHH:MM:ss) 2024-06-25T15:05:37
timezone timezone (formats allowed - GMT/ GMT+0010 / 'America/Chicago') GMT-5

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout results are successfully retrieved and data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "workoutResults": [
            {
                "date": "2024-02-27T21:54:37.000+00:00",
                "distance": 0.1739,
                "duration": 1.05,
                "calorie": 3.0,
                "equipmentId": 1,
                "equipmentName": "Treadmill",
                "score": null,
                "workoutName": "Manual Goals",
                "level": 0.0,
                "pace": 6.03,
                "incline": 5.0,
                "averageSpeed": 9.94,
                "averageHeartRate": 0.0,
                "distanceClimbed": 2730.0,
                "paceTime": null,
                "paceSpeed": null,
                "floorsClimbed": null,
                "watts": 0.0,
                "mets": 0.0,
                "rank": null,
                "runTime": null,
                "strideLength": 0.0,
                "steps": null,
                "floors": null,
                "rpm": null,
                "unit": "I",
                "workoutPresetId": null,
                "guid": "GUID1",
                "workoutPresetName": null,
                "rowersPace": null,
                "avgStrokesPerMin": null
            },
            {
                "date": "2024-03-07T16:59:13.000+00:00",
                "distance": 0.536,
                "duration": 26.8,
                "calorie": 38.0,
                "equipmentId": 1,
                "equipmentName": "Treadmill",
                "score": null,
                "workoutName": "Manual Goals",
                "level": 0.0,
                "pace": 50.0,
                "incline": 0.0,
                "averageSpeed": 1.2,
                "averageHeartRate": 0.0,
                "distanceClimbed": 0.0,
                "paceTime": null,
                "paceSpeed": null,
                "floorsClimbed": null,
                "watts": 0.0,
                "mets": 0.0,
                "rank": null,
                "runTime": null,
                "strideLength": 0.0,
                "steps": null,
                "floors": null,
                "rpm": null,
                "unit": "I",
                "workoutPresetId": null,
                "guid": "GUID2",
                "workoutPresetName": null,
                "rowersPace": null,
                "avgStrokesPerMin": null
            }
        ]
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.resultWorkoutData Object[]
resultWorkoutData.distance numeric
resultWorkoutData.workoutName string
resultWorkoutData.distanceClimbed numeric
resultWorkoutData.equipmentId numeric
resultWorkoutData.duration numeric
resultWorkoutData.score numeric
resultWorkoutData.watts numeric
resultWorkoutData.floors numeric
resultWorkoutData.workoutPresetId numeric
resultWorkoutData.workoutPresetName string
resultWorkoutData.rank numeric
resultWorkoutData.equipmentName string
resultWorkoutData.incline numeric
resultWorkoutData.averageHeartRate numeric
resultWorkoutData.runTime numeric
resultWorkoutData.rowersPace numeric
resultWorkoutData.paceSpeed numeric
resultWorkoutData.mets numeric
resultWorkoutData.level numeric
resultWorkoutData.paceTime numeric
resultWorkoutData.pace numeric
resultWorkoutData.averageSpeed numeric
resultWorkoutData.strideLength numeric
resultWorkoutData.steps numeric
resultWorkoutData.avgStrokesPerMin numeric
resultWorkoutData.rpm numeric
resultWorkoutData.calorie numeric
resultWorkoutData.guid string
resultWorkoutData.floorsClimbed numeric
resultWorkoutData.unit string ("I"/"M") / NULL
resultWorkoutData.date string (ISO 8601)
meta Object / NULL

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4063,
        "errorMsg": "Workout queue cannot be retrieved"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4063,
        "errorMsg": "Workout queue cannot be retrieved"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Get Cardio Workout Result by GUID

Retrieves the Workout Result Details by the Life Fitness Workout Result GUID

Endpoint

GET /api/v3/workout-results/lifefitness/{guid}

GET /api/v3/workout-results/lifefitness/{guid} HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/workout-results/lifefitness/GUID123' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout result was successfully retrieved and data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "date": "2024-03-07T19:29:14.000+00:00",
        "distance": 0.0017,
        "workoutName": "Manual Goals",
        "distanceClimbed": 0.0,
        "equipmentId": 1,
        "duration": 0.08333333333333333,
        "score": null,
        "watts": 0.0,
        "floors": null,
        "workoutPresetId": null,
        "workoutPresetName": null,
        "rank": null,
        "equipmentName": "Treadmill",
        "incline": 0.0,
        "averageHeartRate": 0.0,
        "runTime": null,
        "rowersPace": null,
        "paceSpeed": null,
        "mets": 0.0,
        "level": 0.0,
        "paceTime": null,
        "pace": 50.0,
        "averageSpeed": 1.2,
        "strideLength": 0.0,
        "steps": null,
        "avgStrokesPerMin": null,
        "rpm": null,
        "unit": "I",
        "calorie": 0.0,
        "guid": "GUID123",
        "floorsClimbed": null
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.distance numeric
data.workoutName string
data.distanceClimbed numeric
data.equipmentId numeric
data.duration numeric
data.score numeric
data.watts numeric
data.floors numeric
data.workoutPresetId numeric
data.workoutPresetName string
data.rank numeric
data.equipmentName string
data.incline numeric
data.averageHeartRate numeric
data.runTime numeric
data.rowersPace numeric
data.paceSpeed numeric
data.mets numeric
data.level numeric
data.paceTime numeric
data.pace numeric
data.averageSpeed numeric
data.strideLength numeric
data.steps numeric
data.avgStrokesPerMin numeric
data.rpm numeric
data.calorie numeric
data.guid string
data.floorsClimbed numeric,
data.unit string ("I"/"M") / NULL
data.date string (ISO 8601)
meta Object / NULL

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4063,
        "errorMsg": "Workout result not found with guid: GUID123"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Failed to retrieve workout with guid: GUID123"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

GPS Workout Results

This section contains APIs which manage a user's GPS workout results

Get GPS Workout Result

Retrieves the GPS Workout Results pertaining to the user between the provided date range

Endpoint

GET /api/v3/workout-results/gps?fromDate={fromDate}&toDate={toDate}&timezone={timeZone}

GET /api/v3/workout-results/gps?fromDate={fromDate}&toDate={toDate}&timezone={timeZone} HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/workout-results/gps?fromDate={fromDate}&toDate={toDate}&timezone={timeZone}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Query Parameters

Key Value
fromDate Date (mm/DD/yyyy)
toDate Date (mm/DD/yyyy)
timezone timezone (formats allowed - GMT/ GMT+0010 / 'America/Chicago')

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout result was successfully retrieved and data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "workoutResults": [
            {
                "distance": 6.21371192237,
                "time": 1200.0,
                "calories": 100.0,
                "workoutType": 1,
                "date": "2024-03-06T10:00:00.000+00:00",
                "name": "Workout1",
                "description": "Workout1 Completed Succesfully",
                "unit": "I",
                "guid": null,
                "coordinates": [
                    {
                        "latitude": 1.370817,
                        "longitude": 103.971522,
                        "pauseAfter": false,
                        "timestamp": "2017-05-22T11:11:41.000+00:00",
                        "pace": 21.37798924801149,
                        "speed": 2.8085977889112397,
                        "altitude": 63.01211559841154,
                        "calories": 2.0
                    },
                    {
                        "latitude": 1.370795,
                        "longitude": 103.971493,
                        "pauseAfter": false,
                        "timestamp": "2017-05-22T11:11:44.000+00:00",
                        "pace": 21.31978464001146,
                        "speed": 2.8148115008336103,
                        "altitude": 63.22234947199325,
                        "calories": 2.0
                    }
                ]
            },
        ]
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.workoutResults Object[]
workoutResults.guid string
workoutResults.date string (ISO 8601)
workoutResults.duration numeric
workoutResults.distance numeric
workoutResults.calories numeric
workoutResults.name string
workoutResults.unit string ("I"/"M")
workoutResults.description string
workoutResults.coordinates Object[]
workoutResults.coordinates.latitude numeric
workoutResults.coordinates.longitude numeric
workoutResults.coordinates.pauseAfter Boolean
workoutResults.coordinates.timestamp string (ISO 8601)
workoutResults.coordinates.pace numeric
workoutResults.coordinates.speed numeric
workoutResults.coordinates.altitude numeric
workoutResults.coordinates.calories numeric
meta Object / NULL
status string

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4063,
        "errorMsg": "Workout result not found"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Internal Error"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Save GPS Workout Result

Saves the GPS Workout Result

Endpoint

POST /api/v3/workout-results/gps

POST /api/v3/workout-results/gps HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...

{
    "distance": 6.21371192237,
    "time": 1200.0,
    "calories": 100.0,
    "workoutType": 1,
    "date": "2024-03-06T10:00:00.000+00:00",
    "name": "Workout1",
    "description": "Workout1 Completed Succesfully",
    "unit": "I",
    "guid": null,
    "coordinates": [
        {
            "latitude": 1.370817,
            "longitude": 103.971522,
            "pauseAfter": false,
            "timestamp": "2017-05-22T11:11:41.000+00:00",
            "pace": 21.37798924801149,
            "speed": 2.8085977889112397,
            "altitude": 63.01211559841154,
            "calories": 2.0
        },
        {
            "latitude": 1.370795,
            "longitude": 103.971493,
            "pauseAfter": false,
            "timestamp": "2017-05-22T11:11:44.000+00:00",
            "pace": 21.31978464001146,
            "speed": 2.8148115008336103,
            "altitude": 63.22234947199325,
            "calories": 2.0
        }
    ]
}

curl --location '{{BASE_URL}}/api/v3/workout-results/gps' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'
--data-raw '{
    "distance": 6.21371192237,
    "time": 1200.0,
    "calories": 100.0,
    "workoutType": 1,
    "date": "2024-03-06T10:00:00.000+00:00",
    "name": "Workout1",
    "description": "Workout1 Completed Succesfully",
    "unit": "I",
    "guid": null,
    "coordinates": [
        {
            "latitude": 1.370817,
            "longitude": 103.971522,
            "pauseAfter": false,
            "timestamp": "2017-05-22T11:11:41.000+00:00",
            "pace": 21.37798924801149,
            "speed": 2.8085977889112397,
            "altitude": 63.01211559841154,
            "calories": 2.0
        },
        {
            "latitude": 1.370795,
            "longitude": 103.971493,
            "pauseAfter": false,
            "timestamp": "2017-05-22T11:11:44.000+00:00",
            "pace": 21.31978464001146,
            "speed": 2.8148115008336103,
            "altitude": 63.22234947199325,
            "calories": 2.0
        }
    ]
}'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Body

Parameter Type Required
date string (ISO 8601) Y
duration numeric Y
distance numeric Y
calories numeric Y
name string
unit string ("I"/"M")
description string
coordinates Object[]
coordinates.latitude numeric
coordinates.longitude numeric
coordinates.pauseAfter Boolean
coordinates.timestamp string (ISO 8601)
coordinates.pace numeric
coordinates.speed numeric
coordinates.altitude numeric
cooordinates.calories numeric

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout result was successfully retrieved and data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
            "workoutResult": {
                "unit": "M",
                "distance": 10.0,
                "workoutType": 1,
                "coordinates": [
                    {
                        "latitude": 1.370908,
                        "longitude": 103.971629,
                        "pauseAfter": false,
                        "timestamp": "2017-05-22T11:11:31.000+00:00",
                        "pace": 14.459833333333334,
                        "speed": 4.15,
                        "altitude": 18.94103622436523,
                        "calories": 0.0
                    },
                    {
                        "latitude": 1.37088,
                        "longitude": 103.971597,
                        "pauseAfter": false,
                        "timestamp": "2017-05-22T11:11:34.000+00:00",
                        "pace": 12.249666666666666,
                        "speed": 4.9,
                        "altitude": 19.02259254455566,
                        "calories": 0.0
                    }
                ],
                "name": "Workout1",
                "description": "Workout1 Completed Successfully",
                "guid": null,
                "date": "2024-03-06T10:00:00.000+00:00",
                "duration": 1200.0,
                "calories": 100.0
                }
            },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.workoutResults Object[]
workoutResults.guid string
workoutResults.date string (ISO 8601)
workoutResults.duration numeric
workoutResults.distance numeric
workoutResults.calories numeric
workoutResults.name string
workoutResults.unit string ("I"/"M")
workoutResults.description string
workoutResults.coordinates Object[]
workoutResults.coordinates.latitude numeric
workoutResults.coordinates.longitude numeric
workoutResults.coordinates.pauseAfter Boolean
workoutResults.coordinates.timestamp string (ISO 8601)
workoutResults.coordinates.pace numeric
workoutResults.coordinates.speed numeric
workoutResults.coordinates.altitude numeric
workoutResults.coordinates.calories numeric
meta Object / NULL
status string

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4063,
        "errorMsg": "Workout result not found with guid: GUID123"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Failed to retrieve workout with guid: GUID123"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Manual Cardio Workout Results

This section contains APIs which manage user's manual cardio workout results

Get Manual Cardio Workout Result by GUID

Retrieves the Manual Cardio Workout Result details by the Life Fitness Workout GUID

Endpoint

GET /api/v3/workout-results/cardio/manual/{guid}

GET /api/v3/workout-results/cardio/manual/{guid} HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/workout-results/cardio/manual/GUID123' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout result was successfully retrieved and data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "workoutResult": {
            "guid": "GUID1",
            "distance": 7.0,
            "duration": 50.0,
            "calories": 1500.0,
            "name": "Workout1",
            "unit": "I",
            "date": "2024-03-21T11:24:00.000+00:00",
            "description": "Workout1 Completed successfully",
        }
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.workoutResult Object
workoutResults.guid string
workoutResults.date string (ISO 8601)
workoutResults.duration numeric
workoutResults.distance numeric
workoutResults.calories numeric
workoutResults.name string
workoutResults.unit string ("I"/"M")
meta Object / NULL
status string

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4063,
        "errorMsg": "Workout result not found with guid: GUID123"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Failed to retrieve workout with guid: GUID123"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Get Manual Cardio Workout Result

Retrieves the Manual Cardio Workout Result details between the provided date range

Endpoint

GET /api/v3/workout-results/cardio/manual?fromDate={fromDate}&toDate={toDate}&timezone={timeZone}

GET /api/v3/workout-results/cardio/manual?fromDate={fromDate}&toDate={toDate}&timezone={timeZone} HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/workout-results/cardio/manual?fromDate={fromDate}&toDate={toDate}&timezone={timeZone}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Query Parameters

Key Value
fromDate Date (mm/DD/yyyy)
toDate Date (mm/DD/yyyy)
timezone timezone (formats allowed - GMT/ GMT+0010 / 'America/Chicago')

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout result was successfully retrieved and data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "workoutResults": [
            {
                "guid": "GUID1",
                "distance": 7.0,
                "duration": 50.0,
                "calories": 1500.0,
                "name": "Workout1",
                "unit": "I",
                "date": "2024-03-21T11:24:00.000+00:00",
                "description": "Workout1 Completed successfully",
            },
            {
                "guid": "GUID2",
                "distance": 7.0,
                "duration": 50.0,
                "calories": 1500.0,
                "name": "Workout2",
                "unit": "I",
                "date": "2024-03-21T11:24:00.000+00:00",
                "description": "Workout2 Completed successfully",
            },
            {
                "guid": "GUID3",
                "distance": 7.0,
                "duration": 50.0,
                "calories": 178.0,
                "name": "Workout3",
                "unit": "I",
                "date": "2024-04-01T11:24:00.000+00:00",
                "description": "Workout3 Completed successfully",
            }
        ]
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.workoutResults Object[]
workoutResults.guid string
workoutResults.date string (ISO 8601)
workoutResults.duration numeric
workoutResults.distance numeric
workoutResults.calories numeric
workoutResults.name string
workoutResults.unit string ("I"/"M")
workoutResults.description string
meta Object / NULL
status string

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4063,
        "errorMsg": "Workout result not found"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Internal Error"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Save Manual Cardio Workout Result

Saves the Manual Cardio Workout Result details

Endpoint

POST /api/v3/workout-results/cardio/manual

POST /api/v3/workout-results/cardio/manual HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...

{
    "calories": "178",
    "duration": "50",
    "distance": "7",
    "datePerformed": "2024-04-01T11:24:00Z",
    "name": "Workout1",
    "description": "Workout1 Completed successfully",
    "unit": "I"
}
curl --location '{{BASE_URL}}/api/v3/workout-results/cardio/manual' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

--data-raw '{
    "calories": "178",
    "duration": "50",
    "distance": "7",
    "datePerformed": "2024-04-01T11:24:00Z",
    "name": "Workout1",
    "description": "Workout1 Completed successfully",
    "unit": "I"
}'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Body

Parameter Type Required
calories numeric Y
date string (ISO 8601) Y
duration numeric Y
distance numeric Y
name string Y
unit string ("I"/"M") Y
description string Y

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout result was successfully retrieved and data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "workoutResult": {
            "calories": 178.0,
            "duration": 50.0,
            "distance": 7.0,
            "date": "2024-04-01T11:24:00.000+00:00",
            "name": "Workout1",
            "description": "Workout1 Completed successfully",
            "unit": "I",
            "guid": "GUID1"
        }
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.workoutResult Object
workoutResults.date string (ISO 8601)
workoutResults.duration numeric
workoutResults.distance numeric
workoutResults.calories numeric
workoutResults.name string
workoutResults.unit string ("I"/"M")
meta Object / NULL
status string

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4063,
        "errorMsg": "Workout result not found with guid: GUID123"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Failed to retrieve workout with guid: GUID123"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Manual Strength Workout Results

This section contains APIs which manage a user's manual strength workout results

Get Manual Strength workout result by GUID

Retrieves the Manual Strength Workout Result Details by the Life Fitness Strength Workout Result GUID

Endpoint

GET /api/v3/workout-results/strength/manual/{guid}

GET /api/v3/workout-results/strength/manual/{guid} HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/workout-results/strength/manual/GUID123' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout result was successfully retrieved and data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "workoutResult": {
            "duration": 20,
            "calorie": 2.381362774537109,
            "name": "Test strength5",
            "unit": "I",
            "date": "2024-02-28T11:24:00.000+00:00",
            "guid": "f879275e-b74b-4914-8c2c-c304be48d395",
            "strengthResultSet": [
                {
                    "setNumber": 1,
                    "repetitionsCount": 1,
                    "resistanceWeight": 7.0
                },
                {
                    "setNumber": 2,
                    "repetitionsCount": 1,
                    "resistanceWeight": 5.0
                }
            ]
        }
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.workoutResult Object
workoutResults.date string (ISO 8601)
workoutResults.duration numeric
workoutResults.calories numeric
workoutResults.name string
workoutResults.unit string ("I"/"M")
workoutResults.guid string
workoutResults.strengthResultSet Object[]
workoutResults.strengthResultSet.setNumber numeric
workoutResults.strengthResultSet.repetitionsCount numeric
workoutResults.strengthResultSet.resistanceWeight numeric
meta Object / NULL
status string

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4063,
        "errorMsg": "Workout result not found with guid: GUID123"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Internal Error"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Get Manual Strength Workout Result

Retrieves the manual strength workouts pertaining to the user between the provided date range

Endpoint

GET /api/v3/workout-results/strength/manual?fromDate={fromDate}&toDate={toDate}&timezone={timeZone}

GET /api/v3/workout-results/strength/manual?fromDate={fromDate}&toDate={toDate}&timezone={timeZone} HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/strength/manual?fromDate={fromDate}&toDate={toDate}&timezone={timeZone}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Query Parameters

Key Value
fromDate Date (mm/DD/yyyy)
toDate Date (mm/DD/yyyy)
timezone timezone (formats allowed - GMT/ GMT+0010 / 'America/Chicago')

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout result was successfully retrieved and data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "workoutResults": [
            {
                "duration": 20,
                "calories": 2.381362774537109,
                "name": "Workout1",
                "unit": "I",
                "date": "2024-03-19T11:24:00.000+00:00",
                "guid": "GUID1",
                "strengthResultSet": [
                    {
                        "setNumber": 1,
                        "repetitionsCount": 1,
                        "resistanceWeight": 5.0
                    },
                    {
                        "setNumber": 2,
                        "repetitionsCount": 1,
                        "resistanceWeight": 5.0
                    }
                ]
            },
            {
                "duration": 20,
                "calories": 2.381362774537109,
                "name": "Workout2",
                "unit": "I",
                "date": "2024-03-26T11:24:00.000+00:00",
                "guid": "GUID2",
                "strengthResultSet": [
                    {
                        "setNumber": 1,
                        "repetitionsCount": 1,
                        "resistanceWeight": 7.0
                    },
                    {
                        "setNumber": 2,
                        "repetitionsCount": 1,
                        "resistanceWeight": 5.0
                    }
                ]
            },
        ]
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.workoutResult Object[]
workoutResults.date string (ISO 8601)
workoutResults.duration numeric
workoutResults.calories numeric
workoutResults.name string
workoutResults.unit string ("I"/"M")
workoutResults.guid string
workoutResults.strengthResultSet Object[]
workoutResults.strengthResultSet.setNumber numeric
workoutResults.strengthResultSet.repetitionsCount numeric
workoutResults.strengthResultSet.resistanceWeight numeric
meta Object / NULL
status string

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4063,
        "errorMsg": "Workout result not found"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Internal Error"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Save Manual Strength Workout Result

Saves the manual strength workout pertaining to the user

Endpoint

POST /api/v3/workout-results/strength/manual

POST /api/v3/workout-results/strength/manual HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...

{
    "date": "2024-01-08T11:24:00Z",
    "name": "Workout1",
    "description": "Workout1 Completed successfully",
    "unit": "I",
    "intensity": 3,
    "duration": 20,
    "weight": 5.0,
    "strengthSets": [
        {
            "setNumber": 1,
            "repetitionsCount": 1,
            "resistanceWeight": 7.0
        },
        {
            "setNumber": 2,
            "repetitionsCount": 1,
            "resistanceWeight": 5.0
        }
    ]
}

curl --location '{{BASE_URL}}/api/v3/workout-results/strength/manual' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'
--data-raw '{
    "date": "2024-01-08T11:24:00Z",
    "name": "Workout1",
    "description": "Workout1 Completed successfully",
    "unit": "I",
    "intensity": 3,
    "duration": 20,
    "weight": 5.0,
    "strengthSets": [
        {
            "setNumber": 1,
            "repetitionsCount": 1,
            "resistanceWeight": 7.0
        },
        {
            "setNumber": 2,
            "repetitionsCount": 1,
            "resistanceWeight": 5.0
        }
    ]
}'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Body

Parameter Type Required
date string (ISO 8601) Y
duration numeric Y
calories numeric
name string
unit string ("I"/"M") Y
strengthSets Object[] Y
strengthSets.setNumber numeric Y
strengthSets.repetitionsCount numeric Y
strengthSets.resistanceWeight numeric Y

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout result was successfully retrieved and data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "workoutResult": {
            "duration": 20,
            "calorie": 2.381362774537109,
            "name": "Test strength5",
            "unit": "I",
            "date": "2024-02-28T11:24:00.000+00:00",
            "guid": "f879275e-b74b-4914-8c2c-c304be48d395",
            "strengthResultSet": [
                {
                    "setNumber": 1,
                    "repetitionsCount": 1,
                    "resistanceWeight": 7.0
                },
                {
                    "setNumber": 2,
                    "repetitionsCount": 1,
                    "resistanceWeight": 5.0
                }
            ]
        }
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.workoutResult Object
workoutResults.date string (ISO 8601)
workoutResults.duration numeric
workoutResults.calories numeric
workoutResults.name string
workoutResults.unit string ("I"/"M")
workoutResults.guid string
workoutResults.strengthResultSet Object[]
workoutResults.strengthResultSet.setNumber numeric
workoutResults.strengthResultSet.repetitionsCount numeric
workoutResults.strengthResultSet.resistanceWeight numeric
meta Object / NULL
status string

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4063,
        "errorMsg": "Workout result cannot be saved"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4048,
        "errorMsg": "Internal Error"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Cardio Workout Preset

This section contains APIs regarding a user's workout presets

Get Workout Preset details

Retrieves the user's workout presets

Endpoint

GET /api/v3/workout-presets

GET /api/v3/workout-presets HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/workout-presets' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout result was successfully retrieved and data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "workoutPresets": [
            {
                "id": 1,
                "workoutName": "preset1",
                "activityId": 1,
                "workoutId": 1001,
                "userId": 1234,
                "paramList": [
                    {
                        "paramId": 7,
                        "paramValue": 45.0,
                        "intervalValues": null
                    },
                    {
                        "paramId": 14,
                        "paramValue": 5.0,
                        "intervalValues": null
                    }
                ],
                "createdAt": "2024-04-18T16:23:33.000+00:00",
                "updatedAt": "2024-04-18T16:46:04.000+00:00",
                "unit": "I",
                "uuid": null
            },
            {
                "id": 2,
                "workoutName": "preset2",
                "activityId": 1,
                "workoutId": 1001,
                "userId": 1234,
                "paramList": [
                    {
                        "paramId": 7,
                        "paramValue": 45.0,
                        "intervalValues": null
                    },
                    {
                        "paramId": 14,
                        "paramValue": 5.0,
                        "intervalValues": null
                    }
                ],
                "createdAt": "2024-04-18T16:48:09.000+00:00",
                "updatedAt": null,
                "unit": "I",
                "uuid": null
            }
        ]
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.workoutPresets Object[]
workoutPresets.id numeric
workoutPresets.workoutName numeric
workoutPresets.activityId numeric
workoutPresets.workoutId numeric
workoutPresets.userId numeric
workoutPresets.createdAt string
workoutPresets.updatedAt string
workoutPresets.unit string ("I"/"M")
workoutPresets.uuid string
workoutPresets.paramList Object[]
workoutPresets.paramList.paramId numeric
workoutPresets.paramList.paramValue numeric
workoutPresets.paramList.intervalvalues numeric[]
meta Object / NULL
status string

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}


500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 500,
        "errorMsg": "Internal Error"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Get Workout Preset by Id

Retrieves the workout preset by the workout preset Id

Endpoint

GET /api/v3/workout-presets/{workout_preset}

GET /api/v3/workout-presets/{workout_preset} HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/workout-presets/{presetID1}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout result was successfully retrieved and data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "workoutPreset": 
            {
                "id": 1,
                "workoutName": "preset1",
                "activityId": 1,
                "workoutId": 1001,
                "userId": 1234,
                "paramList": [
                    {
                        "paramId": 7,
                        "paramValue": 45.0,
                        "intervalValues": null
                    },
                    {
                        "paramId": 14,
                        "paramValue": 5.0,
                        "intervalValues": null
                    }
                ],
                "createdAt": "2024-04-18T16:23:33.000+00:00",
                "updatedAt": "2024-04-18T16:46:04.000+00:00",
                "unit": "I",
                "uuid": null
            },
           
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.workoutPreset Object
workoutPreset.id numeric
workoutPreset.workoutName numeric
workoutPreset.activityId numeric
workoutPreset.workoutId numeric
workoutPreset.userId numeric
workoutPreset.createdAt string
workoutPreset.updatedAt string
workoutPreset.unit string ("I"/"M")
workoutPreset.uuid string
workoutPreset.paramList Object[]
workoutPreset.paramList.paramId numeric
workoutPreset.paramList.paramValue numeric
workoutPreset.paramList.intervalvalues numeric[]
meta Object / NULL
status string

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404 
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4009,
        "errorMsg": "Workout not found workoutId: presetId1"
    },
    "meta": null
}


409 
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4008,
        "errorMsg": "Matching workout does not belong to this user workoutId: presetId1"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 500,
        "errorMsg": "Internal Error"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Save a Workout Preset

Saves a new Workout Preset

Endpoint

POST /api/v3/workout-presets

POST /api/v3/workout-presets HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...

{
    "workoutName": "8_28_testC",
    "unit": "I",
    "activityId": 1,
    "workoutId": 1001,
    "paramList": [
        {
            "paramId": 7,
            "paramValue": 45
        },
        {
            "paramId": 14,
            "paramValue": 5
        }
    ]
}

curl --location '{{BASE_URL}}/api/v3/workout-presets' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'
--data '{
    "workoutName": "preset1",
    "unit": "I",
    "activityId": 1,
    "workoutId": 1001,
    "paramList": [
        {
            "paramId": 7,
            "paramValue": 45
        },
        {
            "paramId": 14,
            "paramValue": 5
        }
    ]
}'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Body

Parameter Type Required
id numeric N (Only Required when updating an existing workout preset)
workoutName numeric Y
activityId numeric Y
workoutId numeric Y
unit string ("I"/"M") Y
paramList Object[] Y
paramList.paramId numeric Y
paramList.paramValue numeric Y
paramList.intervalvalues numeric[] N

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout result was successfully retrieved and data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "workoutPreset": 
            {
                "id": 1,
                "workoutName": "preset1",
                "activityId": 1,
                "workoutId": 1001,
                "userId": 1234,
                "paramList": [
                    {
                        "paramId": 7,
                        "paramValue": 45.0,
                        "intervalValues": null
                    },
                    {
                        "paramId": 14,
                        "paramValue": 5.0,
                        "intervalValues": null
                    }
                ],
                "createdAt": "2024-04-18T16:23:33.000+00:00",
                "updatedAt": "2024-04-18T16:46:04.000+00:00",
                "unit": "I",
                "uuid": null
            },
           
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.workoutPreset Object
workoutPreset.id numeric
workoutPreset.workoutName numeric
workoutPreset.activityId numeric
workoutPreset.workoutId numeric
workoutPreset.userId numeric
workoutPreset.createdAt string
workoutPreset.updatedAt string
workoutPreset.unit string ("I"/"M")
workoutPreset.uuid string
workoutPreset.paramList Object[]
workoutPreset.paramList.paramId numeric
workoutPreset.paramList.paramValue numeric
workoutPreset.paramList.intervalvalues numeric[]
meta Object / NULL
status string

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404 
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4009,
        "errorMsg": "Workout not found workoutId: presetId1"
    },
    "meta": null
}


409 
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4008,
        "errorMsg": "Matching workout does not belong to this user workoutId: presetId1"
    },
    "meta": null
}

500

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4083,
        "errorMsg": "Workout name already exists, please choose a new one"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 500,
        "errorMsg": "Internal Error"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Get Workout Preset Image

Retrieves the Workout Preset Image of the workout Preset Id

Endpoint

GET /api/v3/workout-presets/{workout_preset_id}/image

GET /api/v3/workout-presets/{workout_preset_id}/image HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
user-access-token: xyz123...
curl --location '{{BASE_URL}}/api/v3/workout-presets/{presetID1}/image' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout result was successfully retrieved and data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "workoutPreset": {
            "imageURL": "https://imageURL",
            "id": 1
        }
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.workoutPreset Object
workoutPreset.id numeric
workoutPreset.imageURL string
meta Object / NULL
status string

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404 
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4009,
        "errorMsg": "Workout not found: presetId1"
    },
    "meta": null
}


409 
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4008,
        "errorMsg": "Matching workout does not belong to this user: presetId1"
    },
    "meta": null
}

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 500,
        "errorMsg": "Internal Error"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Save Workout Preset Image

Saves the Workout Preset Image of the workout Preset Id

Endpoint

PUT /api/v3/workout-presets/{workout_preset}/image

PUT /api/v3/workout-presets/{workout_preset}/image HTTP/1.1
Host: {{BASE_URL}}
Authorization: Bearer eyAbc...
user-access-token: xyz123...
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Length: 246

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="/PresetImage.jpeg"
Content-Type: image/jpeg

(data)
------WebKitFormBoundary7MA4YWxkTrZu0gW--
curl --location '{{BASE_URL}}/api/v3/workout-presets/{presetID1}/image' \
--header 'Authorization: Bearer eyAbc...' \
--header 'user-access-token: xyz123...'
--header 'Content-Type: multipart/form-data' \
--form 'file=@"/PresetImage.jpeg"'

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}
user-access-token {user-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout successfully saved to the preset.

{
    "status": "SUCCESSFUL",
    "data": {
        "workoutPreset": {
            "imageURL": "https://imageURL",
            "id": 1
        }
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.workoutPreset Object
workoutPreset.id numeric
workoutPreset.imageURL string
meta Object / NULL
status string

Error

Errors returned from this endpoint can be one of the following

401
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 401,
        "errorMsg": "user-access-token Header is missing"
    },
    "meta": null
}

404 
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4009,
        "errorMsg": "Workout not found: presetId1"
    },
    "meta": null
}


409 
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4008,
        "errorMsg": "Matching workout does not belong to this user: presetId1"
    },
    "meta": null
}

500

{  "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 4069,
        "errorMsg": "Invalid image file"
    },
    "meta": null
}

{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 500,
        "errorMsg": "Internal Error"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available

Cardio Activities

This section contains APIs regarding supported activities

Get Cardio Activities

Retrieves the supported activities

Endpoint

GET /api/v3/activities

GET /api/v3/activities HTTP/1.1
Host: {{BASE_URL}}
Accept: application/json
Authorization: Bearer eyAbc...
curl --location '{{BASE_URL}}/api/v3/activities' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyAbc...' 

Headers

Header Value
Accept application/json
Authorization Bearer {oauth-access-token}

Response

Success

A successful response returns a HTTP Status Code: 200 - OK. This indicates the workout result was successfully retrieved and data is available in the body.

{
    "status": "SUCCESSFUL",
    "data": {
        "activities": [
            {
                "activityId": 1,
                "activityName": "Treadmill",
                "activityDescription": "Treadmill",
                "supportedModelIds": "1,4,..."
            },
            ...
        ]
    },
    "error": null,
    "meta": null
}
Parameter Type
data Object
data.activities Object[]
activities.activityId numeric
activities.activityName string
activities.activityDescription string
activities.supportedModelIds string
meta Object / NULL
status string

Error

Errors returned from this endpoint can be one of the following

500
{
    "status": "FAILURE",
    "data": null,
    "error": {
        "errorCode": 500,
        "errorMsg": "Internal Error"
    },
    "meta": null
}
Parameter Type Description
status string Indicates the status of the request - SUCCESSFUL or FAILURE
data object null in case of error
error.errorCode number numeric value corresponding to the error message
error.errorMsg string error message string
meta object meta object will be populated if any relevant metadata is available